code: def extractName(s, search_class=False):
      """Extracts the names of the function or classes in the input string.
  
      Arguments
      ---------
      s: string
          Input string where to search for function or class names.
      search_clas: bool
          If True, searches for class names.
  
      Returns
      -------
      string: string
          Name of the function or class detected.
      """
      string = ""
      if search_class:
          regexp = re.compile(r"(class)\s(.*)\:")
      else:
          regexp = re.compile(r"(def)\s(.*)\(.*\)\:")
      for m in regexp.finditer(s):
          string += m.group(2)
      return string
  
imports: import re
  from speechbrain.utils.data_utils import get_all_files
label_desc: Use image node_id 1 for calling a global function with example usage: extractName(s, search_class) and returns: string