code: def update_sig_from_node(node, sig):
      params = dict(sig.parameters)
      args = node.args
      allargs = (
          *args.posonlyargs,
          *args.args,
          args.vararg,
          *args.kwonlyargs,
          args.kwarg,
      )
      for param in allargs:
          if param is None:
              continue
          if param.annotation is None:
              continue
          annotation = direct_repr(ast.unparse(param.annotation))
          params[param.arg] = params[param.arg].replace(
              annotation=annotation
          )
  
      if node.returns is not None:
          return inspect.Signature(
              params.values(),
              return_annotation=direct_repr(ast.unparse(node.returns)),
          )
      else:
          return inspect.Signature(params.values())
  
imports: import ast
  from enum import Enum
  import functools
  import inspect
  from inspect import Parameter
  from pathlib import Path
  import sys
  import subprocess
  import numpy
  from matplotlib import _api, mlab
  from matplotlib.axes import Axes
  from matplotlib.backend_bases import MouseButton
  from matplotlib.figure import Figure
label_desc: Use image node_id 8 for calling a global function with example usage: update_sig_from_node(node, sig) and returns: inspect, inspect