code: def __sanitize_remove_type_hints(function_source):
      # type: (str) -> str
      try:
          import ast
  
          try:
              # available in Python3.9+
              from ast import unparse
          except ImportError:
              from ...utilities.lowlevel.astor_unparse import unparse
      except ImportError:
          return function_source
  
      # noinspection PyBroadException
      try:
  
          class TypeHintRemover(ast.NodeTransformer):
              def visit_FunctionDef(self, node):
                  # remove the return type definition
                  node.returns = None
                  # remove all argument annotations
                  if node.args.args:
                      for arg in node.args.args:
                          arg.annotation = None
                  return node
  
          # parse the source code into an AST
          parsed_source = ast.parse(function_source)
          # remove all type annotations, function return type definitions
          # and import statements from 'typing'
          transformed = TypeHintRemover().visit(parsed_source)
          # convert the AST back to source code
          return unparse(transformed).lstrip("\n")
      except Exception:
          # just in case we failed parsing.
          return function_source
  
imports: import inspect
  import json
  import os
  import re
  import tempfile
  from sys import platform
  from functools import reduce
  from logging import getLogger
  from typing import Optional, Sequence, Union, Tuple, List, Callable, Dict, Any
  from pathlib2 import Path
  from six.moves.urllib.parse import urlparse
  from .args import _Arguments
  from .repo import ScriptInfo
  from ...task import Task
label_desc: Use image node_id 2 for calling the CreateFromFunction obj's underlying member method code with example usage: obj.__sanitize_remove_type_hints(function_source) and returns: unparse, function_source, function_source, node