code: def func_header_repr(
      func: Callable, keep_annotation: bool = True
  ) -> str:
      source = inspect.getsource(func)
      signature = inspect.signature(func)
  
      if keep_annotation:
          return "".join(
              re.split(r"(\).*?:.*?\n)", source, maxsplit=1)[:2]
          ).strip()
  
      params_repr = ["self"]
      for param in signature.parameters.values():
          params_repr.append(param.name)
          if param.default is not inspect.Parameter.empty:
              params_repr[-1] += f"={param.default}"
  
      return f'def {func.__name__}({", ".join(params_repr)}):'
  
file_path: AutoGL/autogl/module/nas/space/gasso_space/utils/inspector.py
imports: import re
  import inspect
  from collections import OrderedDict
  from typing import Dict, List, Any, Optional, Callable, Set
  from .typing import parse_types
label_desc: Use image node_id 1 for calling a global function with example usage: func_header_repr(func, keep_annotation) and returns: str, func, str, str, str, str