def __init__(self, method):
    """Creates a checker.

    Args:
      # method: A method to check.
      method: function

    Raises:
      ValueError: method could not be inspected, so checks aren't possible.
        Some methods and functions like built-ins can't be inspected.
    """
    try:
      self._args, varargs, varkw, defaults = inspect.getargspec(method)
    except __HOLE__:
      raise ValueError('Could not get argument specification for %r'
                       % (method,))
    if inspect.ismethod(method):
      self._args = self._args[1:]  # Skip 'self'.
    self._method = method

    self._has_varargs = varargs is not None
    self._has_varkw = varkw is not None
    if defaults is None:
      self._required_args = self._args
      self._default_args = []
    else:
      self._required_args = self._args[:-len(defaults)]
      self._default_args = self._args[-len(defaults):]
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/mox/mox.py/MethodCallChecker.__init__