input: Write a Python function to parse an HTML document and extract a directory of engineers with their details in a structured format.
  assert parse_engineers_directory(html_string) == [{'Name': 'John Doe', 'Organization': 'Acme Co.', 'Skills': ['JavaScript', 'Python']}, {'Name': 'Jane Doe', 'Organization': 'Acme Co.', 'Skills': ['JavaScript', 'Node.js']}, {'Name': 'Bob Doe', 'Organization': 'ABC Co.', 'Skills': ['GoLang', 'PHP']}]
  assert parse_engineers_directory("<html><body><ul><li><span>Name: </span><span>Alice Doe</span>, <span>Organization: </span><span>XYZ Co.</span>, <span>Skills: </span><span>Python, Ruby</span></li></ul></body></html>") == [{'Name': 'Alice Doe', 'Organization': 'XYZ Co.', 'Skills': ['Python', 'Ruby']}]
output: def parse_engineers_directory(html_string):
      from bs4 import BeautifulSoup
  
      soup = BeautifulSoup(html_string, 'html.parser')
      engineers_list = []
  
      for li in soup.find_all('li'):
          engineer = {}
          spans = li.find_all('span')
  
          for i in range(0, len(spans), 2):
              key = spans[i].text.strip()[:-1]
              value = spans[i + 1].text.strip()
              if key == 'Skills':
                  engineer[key] = [skill.strip() for skill in value.split(',')]
              else:
                  engineer[key] = value
  
          engineers_list.append(engineer)
  
      return engineers_list