Find and call local method.
482970
def dispatch(self, *args, **kwargs):
        """"""
        action = kwargs.pop('action', 'default')
        action_method = getattr(self, str(action), self.default)
        return action_method(*args, **kwargs)
866735
def collect_local_data(self, profile=None, profile_source=None):
        '''
        
        '''
        def call(func, *args, **kwargs):
            '''
            Call wrapper for templates
            :param func:
            :return:
            '''
            return self._extract_return(self._local_call({'fun': func, 'arg': args, 'kwarg': kwargs}))

        def run(func, *args, **kwargs):
            '''
            Runner wrapper for templates
            :param func:
            :return:
            '''
            return self._extract_return(self._local_run({'fun': func, 'arg': args, 'kwarg': kwargs}))

        scenario = profile_source or salt.cli.support.get_profile(profile or self.config['support_profile'], call, run)
        for category_name in scenario:
            self.out.put(category_name)
            self.collector.add(category_name)
            for action in scenario[category_name]:
                if not action:
                    continue
                action_name = next(iter(action))
                if not isinstance(action[action_name], six.string_types):
                    info, output, conf = self._get_action(action)
                    action_type = self._get_action_type(action)  # run:<something> for runners
                    if action_type == self.RUNNER_TYPE:
                        self.out.put('Running {}'.format(info.lower()), indent=2)
                        self.collector.write(info, self._local_run(conf), output=output)
                    elif action_type == self.CALL_TYPE:
                        if not conf.get('salt.int.intfunc'):
                            self.out.put('Collecting {}'.format(info.lower()), indent=2)
                            self.collector.write(info, self._local_call(conf), output=output)
                        else:
                            self.collector.discard_current()
                            self._internal_function_call(conf)
                    else:
                        self.out.error('Unknown action type "{}" for action: {}'.format(action_type, action))
                else:
                    # TODO: This needs to be moved then to the utils.
                    #       But the code is not yet there (other PRs)
                    self.out.msg('\n'.join(salt.cli.support.console.wrap(action[action_name])), ident=2)
216178
def pull_locals(self, frame):
        """"""
        for name in frame.identifiers.undeclared:
            self.writeline('l_%s = context.resolve(%r)' % (name, name))
1121238
function findInLocal(url, mockFileDir) {
    var urlObject = URL.parse(url);
    var baseDir = path.resolve(process.cwd(), mockFileDir);
    return path.join(baseDir, urlObject.host, urlObject.pathname);
}
1042418
static Method findMethod(Class<?> clazz, String methodName,
            Class<?>[] paramTypes, Object[] paramValues) {

        if (clazz == null || methodName == null) {
            throw new MethodNotFoundException(
                    message(null, "util.method.notfound", clazz, methodName,
                    paramString(paramTypes)));
        }

        if (paramTypes == null) {
            paramTypes = getTypesFromValues(paramValues);
        }

        Method[] methods = clazz.getMethods();

        List<Wrapper> wrappers = Wrapper.wrap(clazz, methods, methodName);

        Wrapper result = findWrapper(
                clazz, wrappers, methodName, paramTypes, paramValues);

        if (result == null) {
            return null;
        }
        return getMethod(clazz, (Method) result.unWrap());
    }
1222852
def ucamel_method(func):
    
    frame_locals = inspect.currentframe().f_back.f_locals
    frame_locals[snake2ucamel(func.__name__)] = func
    return func
1043282
def _dispatch(self, method, params):
        """"""
        self._count += 1

        func = getattr(self, method)
        try:
            return func(*params)
        except Exception as e:
            traceback.print_exc()
            raise e
601248
def _find_global(self, module, func):
        """"""
        if module == __name__:
            if func == '_unpickle_call_error' or func == 'CallError':
                return _unpickle_call_error
            elif func == '_unpickle_sender':
                return self._unpickle_sender
            elif func == '_unpickle_context':
                return self._unpickle_context
            elif func == 'Blob':
                return Blob
            elif func == 'Secret':
                return Secret
            elif func == 'Kwargs':
                return Kwargs
        elif module == '_codecs' and func == 'encode':
            return self._unpickle_bytes
        elif module == '__builtin__' and func == 'bytes':
            return BytesType
        raise StreamError('cannot unpickle %r/%r', module, func)
1163309
private Object get(final int local) {
        maxLocals = Math.max(maxLocals, local + 1);
        return local < locals.size() ? locals.get(local) : Opcodes.TOP;
    }
355164
def method_call(receiver, message, args, pseudo_type=None):
    ''''''

    if not isinstance(receiver, Node):
        receiver = local(receiver)
    return Node('method_call', receiver=receiver, message=message, args=args, pseudo_type=pseudo_type)
806617
def _get_local_dict(self):
        """"""
        try:
            return getattr(THREAD_STORE, self.namespace)
        except AttributeError:
            local_var = dict(*self.args, **self.kwargs)
            setattr(THREAD_STORE, self.namespace, local_var)
            return local_var
184556
function select(invoked, local) {
  var embark;
  if (local) {
    embark = local;
  } else {
    embark = invoked;
  }
  return embark;
}
750500
function locate (methods) {
  var found = []
  var i = -1

  while (++i < methods.length) {
    if (methods[i] && methods[i].match(/FrontMatter$/)) {
      found.push(methods[i])
    }
  }

  return found
}
607336
private Object doInvokeMethod(String methodName, Object name, Object args) {
        Reference explicitResult = new Reference();
        if (checkExplicitMethod(methodName, args, explicitResult)) {
            return explicitResult.get();
        } else {
            try {
                return dispatchNodeCall(name, args);
            } catch(MissingMethodException mme) {
                if(mme.getMethod().equals(methodName) && methodMissingDelegate != null) {
                    return methodMissingDelegate.call(methodName, args);
                }
                throw mme;
            }
        }
    }
197555
def getlocals(back=2):
    """"""
    import inspect
    fr = inspect.currentframe()
    try:
        while fr and back != 0:
            fr1 = fr
            fr = fr.f_back
            back -= 1
    except:
        pass
    return fr1.f_locals
544836
def get_local(self, name, recurse=True):
        
        self._dlog("getting local '{}'".format(name))
        return self._search("vars", name, recurse)
1337305
def method_caller(method_name, *args, **kwargs):
	
	def call_method(target):
		func = getattr(target, method_name)
		return func(*args, **kwargs)
	return call_method