code: def remove_comments(source):
      """(Taken from `hyperas.utils`). Remove all comments from `source` fragment
  
      Parameters
      ----------
      source: String
          A stringified fragment of source code
  
      Returns
      -------
      string: String
          `source`, less any comments"""
      string = re.sub(
          re.compile("'''.*?'''", re.DOTALL), "", source
      )  # Remove '''...''' comments
      string = re.sub(
          re.compile("(?<!(['\"]).)#[^\n]*?\n"), "\n", string
      )  # Remove #...\n comments
      return string
  
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 7 for calling a global function with example usage: remove_comments(source) and returns: string