code: def remove_imports(source):
      """(Taken from `hyperas.utils`). Remove all imports statements from `source` fragment
  
      Parameters
      ----------
      source: String
          A stringified fragment of source code
  
      Returns
      -------
      non_import_lines: String
          `source`, less any lines containing imports"""
      tree = parse(source)
      import_parser = ImportParser()
      import_parser.visit(tree)
      lines = source.split("\n")  # Source including all comments
      lines_to_remove = set(import_parser.line_numbers)
      non_import_lines = [
          _line
          for _i, _line in enumerate(lines, start=1)
          if _i not in lines_to_remove
      ]
      return "\n".join(non_import_lines)
  
imports: from hyperparameter_hunter.utils.file_utils import RetryMakeDirs
  from ast import NodeVisitor, parse
  from inspect import getsource
  from operator import attrgetter
  import os
  import re
label_desc: Use image node_id 6 for calling a global function with example usage: remove_imports(source) and returns: str