code: def find_names(node):
      
      return list(
          toolz.unique(
              filter(None, NameFinder().find(node)),
              key=lambda node: (node.id, type(node.ctx)),
          )
      )
docs: Return the unique :class:`ast.Name` instances in an AST.
  
      Parameters
      ----------
      node : ast.AST
  
      Returns
      -------
      unique_names : List[ast.Name]
  
      Examples
      --------
      >>> import ast
      >>> node = ast.parse('a + b')
      >>> names = find_names(node)
      >>> names  # doctest: +ELLIPSIS
      [<_ast.Name object at 0x...>, <_ast.Name object at 0x...>]
      >>> names[0].id
      'a'
      >>> names[1].id
      'b'