class_docstr: Inspects a given class and collects information about its instance
  methods.
  
  Args:
      cls (Type): The class to inspect.
docstr: Returns the function signature of the inspected function
  :obj:`func`.
  
  Args:
      func (callabel or str): The function.
      exclude (list[str], optional): The parameter names to exclude.
          (default: :obj:`None`)
docstr_tok: ["Returns","the","function","signature","of","the","inspected","function",":","obj",":","`","func","`",".","Args",":","func","(","callabel","or","str",")",":","The","function",".","exclude","(","list","[","str","]",",","optional",")",":","The","parameter","names","to","exclude",".","(","default",":",":","obj",":","`","None","`",")"]
code: def get_signature(
      self,
      func: Union[Callable, str],
      exclude: Optional[List[str]] = None,
  ) -> Signature:
      r"""Returns the function signature of the inspected function
      :obj:`func`.
  
      Args:
          func (callabel or str): The function.
          exclude (list[str], optional): The parameter names to exclude.
              (default: :obj:`None`)
      """
      func_name = func if isinstance(func, str) else func.__name__
      signature = self._signature_dict.get(func_name)
      if signature is None:
          raise IndexError(
              f"Could not access signature for function "
              f"'{func_name}'. Did you forget to inspect it?"
          )
  
      if exclude is None:
          return signature
  
      param_dict = {
          name: param
          for name, param in signature.param_dict.items()
          if name not in exclude
      }
      return Signature(
          param_dict=param_dict,
          return_type=signature.return_type,
          return_type_repr=signature.return_type_repr,
      )
  
imports: import inspect
  import re
  import sys
  import typing
  from typing import Any, Callable, Dict, List, NamedTuple, Optional, Type, Union
  from torch import Tensor
label_desc: Use image node_id 8 for calling the Inspector obj's underlying member method code with example usage: obj.get_signature(func, exclude) and returns: Signature, signature