code: def from_c_types(signature: bytes) -> "Signature":
      # Match strings like "double(int, double)"
      # and extract the return type and the joined arguments
      expr = re.compile(
          rb"\s*(?P<restype>[\w ]*\w+)\s*\((?P<args>[\w\s,]*)\)"
      )
      re_match = re.fullmatch(expr, signature)
  
      if re_match is None:
          raise ValueError(f"Invalid signature: {signature.decode()}")
  
      groups = re_match.groupdict()
      res_c_type = groups["restype"].decode()
      res_dtype: DTypeLike = _C_TO_NUMPY[res_c_type]
  
      raw_args = groups["args"]
  
      decl_expr = re.compile(
          rb"\s*(?P<type>((long )|(unsigned )|(signed )|(double )|)"
          rb"((double)|(float)|(int)|(short)|(char)|(long)|(bool)|(complex)))"
          rb"(\s(?P<name>[\w_]*))?\s*"
      )
  
      arg_dtypes = []
      arg_names: list[Optional[str]] = []
      arg_c_types = []
      for raw_arg in raw_args.split(b","):
          re_match = re.fullmatch(decl_expr, raw_arg)
          if re_match is None:
              raise ValueError(
                  f"Invalid signature: {signature.decode()}"
              )
          groups = re_match.groupdict()
          arg_c_type = groups["type"].decode()
          try:
              arg_dtype = _C_TO_NUMPY[arg_c_type]
          except KeyError:
              raise ValueError(f"Unknown C type: {arg_c_type}")
  
          arg_c_types.append(arg_c_type)
          arg_dtypes.append(arg_dtype)
          name = groups["name"]
          if not name:
              arg_names.append(None)
          else:
              arg_names.append(name.decode())
  
      return Signature(
          res_dtype, res_c_type, arg_dtypes, arg_c_types, arg_names
      )
  
imports: import ctypes
  import importlib
  import re
  from collections.abc import Mapping
  from dataclasses import dataclass
  from typing import Any, Callable, Optional, cast
  import numba
  import numpy
  from numpy.typing import DTypeLike
  from scipy import LowLevelCallable
label_desc: Use image node_id 4 for calling the Signature obj's underlying member method code with example usage: obj.from_c_types(signature) and returns: Signature