parameters: (nodes, position)
return_statement: return nodes_before.count(','), key_str
docstring: Returns the amount of commas and the keyword argument string.
docstring_summary: Returns the amount of commas and the keyword argument string.
docstring_tokens: Returns the amount of commas and the keyword argument string .
function: def _get_index_and_key(nodes, position):
      """
      Returns the amount of commas and the keyword argument string.
      """
      nodes_before = [c for c in nodes if c.start_pos < position]
      if nodes_before[-1].type == 'arglist':
          nodes_before = [c for c in nodes_before[-1].children if c.start_pos < position]
  
      key_str = None
  
      if nodes_before:
          last = nodes_before[-1]
          if last.type == 'argument' and last.children[1].end_pos <= position:
              # Checked if the argument
              key_str = last.children[0].value
          elif last == '=':
              key_str = nodes_before[-2].value
  
      return nodes_before.count(','), key_str
function_tokens: def _get_index_and_key ( nodes , position ) : nodes_before = [ c for c in nodes if c . start_pos < position ] if nodes_before [ - 1 ] . type == 'arglist' : nodes_before = [ c for c in nodes_before [ - 1 ] . children if c . start_pos < position ] key_str = None if nodes_before : last = nodes_before [ - 1 ] if last . type == 'argument' and last . children [ 1 ] . end_pos <= position : # Checked if the argument key_str = last . children [ 0 ] . value elif last == '=' : key_str = nodes_before [ - 2 ] . value return nodes_before . count ( ',' ) , key_str