parameters: (module, all_scopes)
return_statement: return names
docstring: Returns a dictionary with name parts as keys and their call paths as
      values.
docstring_summary: Returns a dictionary with name parts as keys and their call paths as
      values.
docstring_tokens: Returns a dictionary with name parts as keys and their call paths as values .
function: def get_module_names(module, all_scopes):
      """
      Returns a dictionary with name parts as keys and their call paths as
      values.
      """
      names = chain.from_iterable(module.get_used_names().values())
      if not all_scopes:
          # We have to filter all the names that don't have the module as a
          # parent_scope. There's None as a parent, because nodes in the module
          # node have the parent module and not suite as all the others.
          # Therefore it's important to catch that case.
          names = [n for n in names if get_parent_scope(n).parent in (module, None)]
      return names
function_tokens: def get_module_names ( module , all_scopes ) : names = chain . from_iterable ( module . get_used_names ( ) . values ( ) ) if not all_scopes : # We have to filter all the names that don't have the module as a # parent_scope. There's None as a parent, because nodes in the module # node have the parent module and not suite as all the others. # Therefore it's important to catch that case. names = [ n for n in names if get_parent_scope ( n ) . parent in ( module , None ) ] return names