def ui_complete_delete(self, parameters, text, current_param):
        '''
        Parameter auto-completion method for user command delete.
        @param parameters: Parameters on the command line.
        @type parameters: dict
        @param text: Current text of parameter being typed by the user.
        @type text: str
        @param current_param: Name of parameter to complete.
        @type current_param: str
        @return: Possible completions
        @rtype: list of str
        '''
        completions = []
        # TODO: Check if a dict comprehension is acceptable here with supported
        #  XXX: python versions.
        portals = {}
        all_ports = set([])
        for portal in self.tpg.network_portals:
            all_ports.add(str(portal.port))
            portal_ip = portal.ip_address.strip('[]')
            if not portals in portal_ip:
                portals[portal_ip] = []
            portals[portal_ip].append(str(portal.port))

        if current_param == 'ip_address':
            completions = [addr for addr in portals if addr.startswith(text)]
            if 'ip_port' in parameters:
                port = parameters['ip_port']
                completions = [addr for addr in completions
                               if port in portals[addr]]
        elif current_param == 'ip_port':
            if 'ip_address' in parameters:
                addr = parameters['ip_address']
                if addr in portals:
                    completions = [port for port in portals[addr]
                                   if port.startswith(text)]
            else:
                completions = [port for port in all_ports
                               if port.startswith(text)]

        if len(completions) == 1:
            return [completions[0] + ' ']
        else:
            return completions
dataset/ETHPy150Open agrover/targetcli-fb/targetcli/ui_target.py/UIPortals.ui_complete_delete/swapped operands of `in`