code: def _match_section(section, match):
      '''checks whether the `type` of section is in the `match` dictionary
  
      Works around the unknown ordering of s-expressions in each section.
      For instance, the `type` is the 3-rd one in for CellBodies
          ("CellBody"
           (Color Yellow)
           (CellBody)
           (Set "cell10")
          )
  
      Returns:
          value associated with match[section_type], None if no match
      '''
      # TODO: rewrite this so it is more clear, and handles sets & dictionaries for matching
      for i in range(5):
          if i >= len(section):
              return None
          if isinstance(section[i], StringType) and section[i] in match:
              return match[section[i]]
      return Nonf _match_section(section, match):
      '''checks whether the `type` of section is in the `match` dictionary
  
      Works around the unknown ordering of s-expressions in each section.
      For instance, the `type` is the 3-rd one in for CellBodies
          ("CellBody"
           (Color Yellow)
           (CellBody)
           (Set "cell10")
          )
  
      Returns:
          value associated with match[section_type], None if no match
      '''
      # TODO: rewrite this so it is more clear, and handles sets & dictionaries for matching
      for i in range(5):
          if i >= len(section):
              return None
          if isinstance(section[i], StringType) and section[i] in match:
              return match[section[i]]
      return None
docs: checks whether the `type` of section is in the `match` dictionary
  
      Works around the unknown ordering of s-expressions in each section.
      For instance, the `type` is the 3-rd one in for CellBodies
          ("CellBody"
           (Color Yellow)
           (CellBody)
           (Set "cell10")
          )
  
      Returns:
          value associated with match[section_type], None if no match