<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _build_connection_args(self, klass):
 """Read connection args spec, exclude self from list of possible :param klass: Redis connection class. """

        bases = [base for base in klass.__bases__ if base is not object]
        all_args = []
        for cls in [klass] + bases:
            try:
                args = inspect.getfullargspec(cls.__init__).args
            except AttributeError:
                args = inspect.getargspec(cls.__init__).args
            for arg in args:
                if arg in all_args:
                    continue
                all_args.append(arg)
        all_args.remove('self')
        return all_args