TODO:
        we should know from where user has come and use right interface
        as well right interface can be chosen

        :param args:
        :param kwargs:
        :return:
549448
async def send_text_message_to_all_interfaces(self, *args, **kwargs):
        
        logger.debug('async_send_text_message_to_all_interfaces')
        tasks = [interface.send_text_message(*args, **kwargs)
                 for _, interface in self.interfaces.items()]

        logger.debug('  tasks')
        logger.debug(tasks)

        res = [body for body in await asyncio.gather(*tasks)]
        logger.debug('  res')
        logger.debug(res)
        return res
787096
def arg(*args, **kwargs):
    
    def _arg(f):
        if not hasattr(f, '_subcommand_args'):
            f._subcommand_args = []
        f._subcommand_args.append((args, kwargs))
        return f
    return _arg
712770
def call_orig(self, *args, **kwargs):
        '''
        
        '''
        if hasattr(self._obj, '__self__') and \
                inspect.isclass(self._obj.__self__) and \
                self._obj.__self__ is self._instance:
            return self._obj.__func__(self._instance, *args, **kwargs)
        elif hasattr(self._obj, 'im_self') and \
                inspect.isclass(self._obj.im_self) and \
                self._obj.im_self is self._instance:
            return self._obj.im_func(self._instance, *args, **kwargs)
        else:
            return self._obj(*args, **kwargs)
1295835
def find_callback(args, kw=None):
    ''
    if args and callable(args[-1]):
        return args[-1], args[:-1]
    try:
        return kw['callback'], args
    except (KeyError, TypeError):
        return None, args
1344364
def get_form_kwargs(self):
        
        data = super(UserContextFormViewMixin, self).get_form_kwargs()
        data.update({
            'user': self.get_agnocomplete_context(),
        })
        return data
1329025
def _get_kwarg(self, name, kwargs):
        
        at_name = '@{}'.format(name)

        if name in kwargs:
            if at_name in kwargs:
                raise ValueError('Both {!r} and {!r} specified in kwargs'.format(name, at_name))
            return kwargs[name]

        if at_name in kwargs:
            return kwargs[at_name]

        return not_set
971921
def fill(self, *args, **kwargs):
        
        self.fill_kwargs(**kwargs)
        self.fill_arg(*args)
        self.assert_full()
        return self
157747
def cli(ctx, **kwargs):
    
    log.critical("cli kwargs: %s", repr(kwargs))
    ctx.obj = CliConfig(**kwargs)
86511
def start(self, **kwargs):
        
        return self.client.api.start(self.id, **kwargs)
1270380
def __args_check(self, valid, args=None, kwargs=None):
        '''
        
        '''
        if not isinstance(valid, list):
            valid = [valid]
        for cond in valid:
            if not isinstance(cond, dict):
                # Invalid argument
                continue
            # whitelist args, kwargs
            cond_args = cond.get('args', [])
            good = True
            for i, cond_arg in enumerate(cond_args):
                if args is None or len(args) <= i:
                    good = False
                    break
                if cond_arg is None:  # None == '.*' i.e. allow any
                    continue
                if not self.match_check(cond_arg, six.text_type(args[i])):
                    good = False
                    break
            if not good:
                continue
            # Check kwargs
            cond_kwargs = cond.get('kwargs', {})
            for k, v in six.iteritems(cond_kwargs):
                if kwargs is None or k not in kwargs:
                    good = False
                    break
                if v is None:  # None == '.*' i.e. allow any
                    continue
                if not self.match_check(v, six.text_type(kwargs[k])):
                    good = False
                    break
            if good:
                return True
        return False
863601
def open(self, *args, **kwargs):
        
        with io_error_compat():
            return io.open(self, *args, **kwargs)
963562
def passing(self, *args, **kwargs):
        
        self.args = args
        self.kwargs = kwargs
        return self
1047401
def get_form_kwargs(self):
        
        kwargs = {'initial': self.get_initial(),
                  'instance': self.object}

        if self.request.method in ('POST', 'PUT') and self.can_submit:
            kwargs.update({
                'data': self.request.POST,
                'files': self.request.FILES
            })
        return kwargs
340029
def send_kwargs(self) -> dict:
        

        display_page = self.display_page
        page_num = f'\nPage {display_page + 1}/{self.page_count}'
        content = self.pages[display_page] + page_num
        return {'content': content}
855536
def valid_options(kwargs, allowed_options):
    

    diff = set(kwargs) - set(allowed_options)
    if diff:
        print("Invalid option(s): ", ', '.join(diff))
        return False
    return True
814850
def __get_matching_withargs_indices(self, *args, **kwargs):
        
        return self.__get_matching_indices(args, kwargs, self._conditions["args"], self._conditions["kwargs"])
293495
def verify_arguments(self, args=None, kwargs=None):
        

        args = self.args if args is None else args
        kwargs = self.kwargs if kwargs is None else kwargs

        try:
            verify_arguments(self._target, self._method_name, args, kwargs)
        except VerifyingBuiltinDoubleArgumentError:
            if doubles.lifecycle.ignore_builtin_verification():
                raise