code: def _get_types(func, clsm, slf, clss = None, prop_getter = False,
              unspecified_type = Any, infer_defaults = None):
      
      func0 = util._actualfunc(func, prop_getter)
      # check consistency regarding special case with 'self'-keyword
      if not slf:
          argNames = util.getargnames(util.getargspecs(func0))
          if len(argNames) > 0:
              if clsm:
                  if argNames[0] != 'cls':
                      util._warn_argname('classmethod using non-idiomatic cls argname',
                              func0, slf, clsm, clss)
      if clss is None and (slf or clsm):
          if slf:
              assert util.is_method(func) or isinstance(func, property)
          if clsm:
              assert util.is_classmethod(func)
          clss = util.get_class_that_defined_method(func)
          assert hasattr(clss, func.__name__)
      args, res = _funcsigtypes(func, slf or clsm, clss, None, prop_getter,
              unspecified_type = unspecified_type, infer_defaults = infer_defaults)
      return _match_stub_type(args), _match_stub_type(res)
docs: Helper for get_types and get_member_types.