code: def _build_connection_args(self, klass):
          
          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
docs: Read connection args spec, exclude self from list of possible
  
          :param klass: Redis connection class.