code: def valid_function_signature(input_type, func):
      
      funcsig = signature(func)
      declared_parameter_count = len(input_type)
      function_parameter_count = parameter_count(funcsig)
  
      if declared_parameter_count != function_parameter_count:
          raise TypeError(
              'Function signature {!r} has {:d} parameters, '
              'input_type has {:d}. These must match'.format(
                  func.__name__,
                  function_parameter_count,
                  declared_parameter_count,
              )
          )
      return funcsig
docs: Check that the declared number of inputs (the length of `input_type`)
      and the number of inputs to `func` are equal.
  
      Parameters
      ----------
      input_type : List[DataType]
      func : callable
  
      Returns
      -------
      inspect.Signature