def completedefault(self, text, line, begidx, endidx):
        """Handles tab-completion of method names exported by API.

        The matching of the first term (the object name exported by the API)
        is done separately, using the results of copmletenames().

        :param text: Part of method name (second arg) typed so far by user.
        :type text: string
        :param line: Entire line typed so far by user.
        :type line: string
        :param begidx: Index into "line" where "text" begins.
        :type begidx: int
        :param endidx: Index into "line" where "text" ends.
        :type endidx: int
        :returns: List of exported API methods that match text given by user.

        """
        obj, _, rest = line.partition(" ")
        if self.ctrl_client.objects in obj:
            # If the user tries to tab-complete once they have typed
            # `obj method par..`, "par.." being the start of a param, this
            # line will grab the method name only, dropping the param. We
            # can't tab-complete params at the moment (but that would be nice).
            method, _, params = rest.strip().partition(" ")
            # Only does this if user is tab-completing method, not params
            if method == text:  # FIXME: Should actually verify index position
                method_names = self.ctrl_client.objects[obj]
                match_names = [x for x in method_names if x.startswith(text)]
                return match_names
dataset/ETHPy150Open IEEERobotics/bot/bot/interface/cli.py/CLI.completedefault/swapped operands of `in`