parameters: (node)
return_statement: return all_matches
docstring: Scans the node for all imports.
  
      Returns a list of tuples. Each tuple has two elements:
          1. The main import (e.g. module, module.file, module.module2)
          2. Additional optional imports that could be functions or files
              in the case of a "from X import Y" statement. In the case of a
              normal "import" statement, this is None.
docstring_summary: Scans the node for all imports.
docstring_tokens: Scans the node for all imports .
function: def find_include_names(node):
      """Scans the node for all imports.
  
      Returns a list of tuples. Each tuple has two elements:
          1. The main import (e.g. module, module.file, module.module2)
          2. Additional optional imports that could be functions or files
              in the case of a "from X import Y" statement. In the case of a
              normal "import" statement, this is None.
      """
      text = node.get_text_contents()
      all_matches = []
      matches = from_cre.findall(text)
      if matches:
          for match in matches:
              imports = [i.strip() for i in match[1].split(',')]
  
              # Add some custom logic to strip out "as" because the regex
              # includes it.
              last_import_split = imports[-1].split()
              if len(last_import_split) > 1:
                  imports[-1] = last_import_split[0]
  
              all_matches.append((match[0], imports))
  
      matches = import_cre.findall(text)
      if matches:
          for match in matches:
              all_matches.append((match, None))
  
      return all_matches
function_tokens: def find_include_names ( node ) : text = node . get_text_contents ( ) all_matches = [ ] matches = from_cre . findall ( text ) if matches : for match in matches : imports = [ i . strip ( ) for i in match [ 1 ] . split ( ',' ) ] # Add some custom logic to strip out "as" because the regex # includes it. last_import_split = imports [ - 1 ] . split ( ) if len ( last_import_split ) > 1 : imports [ - 1 ] = last_import_split [ 0 ] all_matches . append ( ( match [ 0 ] , imports ) ) matches = import_cre . findall ( text ) if matches : for match in matches : all_matches . append ( ( match , None ) ) return all_matches