Given a simple callable or a callable wrapped in funtools.partial, determines
        if it was wrapped with the :py:func:`gemstone.async_method` decorator.
        
        :param method:
        :return:
542963
def _method_is_async_generator(self, method):
        
        if hasattr(method, "func"):
            func = method.func
        else:
            func = method

        return getattr(func, "_is_coroutine", False)
981952
def method_missing(meth, *args, &block)
      # Check to see if it can be evaluated
      if(matches? meth)
        #Defines the method and caches it to the class
        self.class.send(:define_method, meth) do
          # Splits the method and parameter. See formatize and directionize
          send directionize(meth).to_sym, formatize(meth)
        end
        # calls the method
        send meth, *args, &block
      else
        super
      end
    end
868417
def server_side(func):
    
    def inner(*args, **kwargs):
        if args and hasattr(args[0], 'is_server') and not voltron.debugger:
            raise ServerSideOnlyException("This method can only be called on a server-side instance")
        return func(*args, **kwargs)
    return inner
218135
def partial_safe_wraps(wrapped_func, *args, **kwargs):
    
    if isinstance(wrapped_func, functools.partial):
        return partial_safe_wraps(wrapped_func.func)
    else:
        return functools.wraps(wrapped_func)
831311
def needs_fully_loaded(method):
    
    @functools.wraps(method)
    def inner(self, *args, **kwargs):
        if not self.fully_loaded:
            loaded_yaml = yaml_loader.YamlLoader.load_yaml_by_path(self.path)
            self.parsed_yaml = loaded_yaml
            self.fully_loaded = True
        return method(self, *args, **kwargs)

    return inner
1072411
function (method) {
    return (
      /* The core method implementation. */
      function () {
        if (api.enabled) {
          if (doesConsoleExistImpl()) {
            /* The common way. */
            if (typeof console[method] === "function") {
              console[method].apply(console, arguments);
            }
            /* The IE 8–9 way. */
            else {
              P_FUNCTION.apply.call(console[method], console, arguments);
            }
          }
          else {
            api.logs.push(P_ARRAY.slice.call(arguments));
          }
        }
        return api;
      }
    );
  }
353309
def is_function_or_method(obj):
    
    return inspect.isfunction(obj) or inspect.ismethod(obj) or is_cython(obj)
1224059
def Partial(func, **kwargs):
    
    if isinstance(func, str):
        func = resolve_dotted_name(func)
    partial_func = partial(func, **kwargs)
    update_wrapper(partial_func, func)
    return partial_func
280985
function wrap(fn, wrapper) {
        if (!wrapper)
            wrapper = function(f){ f.apply(this, slice.call(arguments, 1)) }

        return partial(wrapper, fn)
    }
237084
def hasmethod(obj, meth):
  
  if hasattr(obj, meth):
    return callable(getattr(obj,meth))
  return False
932957
def method_missing(method, *args, &block)
      return super unless @template.respond_to? method
      # Delegate the method so that we don't come in here the next time
      # when same method is called
      self.class.delegate method, to: :@template
      @template.public_send method, *args, &block
    end
348633
def decorator(self, func):
        
        if inspect.isfunction(func):
            func._methodview = self
        elif inspect.ismethod(func):
            func.__func__._methodview = self
        else:
            raise AssertionError('Can only decorate function and methods, {} given'.format(func))
        return func
1337305
def method_caller(method_name, *args, **kwargs):
	
	def call_method(target):
		func = getattr(target, method_name)
		return func(*args, **kwargs)
	return call_method
877212
def is_simple_callable(obj):
    
    function = inspect.isfunction(obj)
    method = inspect.ismethod(obj)

    if not (function or method):
        return False

    args, _, _, defaults = inspect.getargspec(obj)
    len_args = len(args) if function else len(args) - 1
    len_defaults = len(defaults) if defaults else 0
    return len_args <= len_defaults
859149
def func_factory(p, method: str) -> callable:
    

    def callback(pretty: bool = False):
        res = getattr(p, method)
        dump = partial(json.dumps, indent=4) if pretty else partial(json.dumps)
        click.echo(dump(res))

    return callback
957229
def _async_callable(func):
    """"""
    if isinstance(func, types.CoroutineType):

        return func

    @functools.wraps(func)
    async def _async_def_wrapper(*args, **kwargs):
        """Wrap a a sync callable in an async def."""
        return func(*args, **kwargs)

    return _async_def_wrapper
1199975
def is_method(func):
    
    func0 = _actualfunc(func)
    argNames = getargnames(getargspecs(func0))
    if len(argNames) > 0:
        if argNames[0] == 'self':
            if inspect.ismethod(func):
                return True
            elif sys.version_info.major >= 3:
                # In Python3 there are no unbound methods, so we count as method,
                # if first arg is called 'self' 
                return True
            else:
                _warn_argname('is_method encountered non-method declaring self',
                        func0, False, False, None)
        else:
            return inspect.ismethod(func)
    return False