nodes: 0, module; 1, function_definition; 2, function_name:first_key; 3, parameters; 4, comment:# type: (List[str]) -> str; 5, block; 6, identifier:lines; 7, expression_statement; 8, for_statement; 9, comment:"""Returns a string representing the sort key of a block.
  
      The sort key is the first YAML key we encounter, ignoring comments, and
      stripping leading quotes.
  
      >>> print(test)
      # some comment
      'foo': true
      >>> first_key(test)
      'foo'
      """; 10, identifier:line; 11, identifier:lines; 12, block; 13, else_clause; 14, if_statement; 15, if_statement; 16, return_statement; 17, block; 18, call; 19, block; 20, call; 21, block; 22, identifier:line; 23, return_statement; 24, attribute; 25, argument_list; 26, continue_statement; 27, identifier:any; 28, generator_expression; 29, return_statement; 30, string; 31, identifier:line; 32, identifier:startswith; 33, string; 34, call; 35, for_in_clause; 36, subscript; 37, string_content:#; 38, attribute; 39, argument_list; 40, identifier:quote; 41, identifier:QUOTES; 42, identifier:line; 43, slice; 44, identifier:line; 45, identifier:startswith; 46, identifier:quote; 47, integer:1
code: def first_key(lines):  # type: (List[str]) -> str
      """Returns a string representing the sort key of a block.
  
      The sort key is the first YAML key we encounter, ignoring comments, and
      stripping leading quotes.
  
      >>> print(test)
      # some comment
      'foo': true
      >>> first_key(test)
      'foo'
      """
      for line in lines:
          if line.startswith('#'):
              continue
          if any(line.startswith(quote) for quote in QUOTES):
              return line[1:]
          return line
      else:
          return ''