code: def _select_Generic_superclass_parameters(subclass, superclass_origin):
      
      subclass = _find_base_with_origin(subclass, superclass_origin)
      if subclass is None:
          return None
      if subclass.__origin__ is superclass_origin:
          return subclass.__args__
      prms = _find_Generic_super_origin(subclass, superclass_origin)
      res = []
      for prm in prms:
          sub_search = subclass
          while not sub_search is None:
              try:
                  res.append(sub_search.__args__[sub_search.__origin__.__parameters__.index(prm)])
                  break
              except ValueError:
                  # We search the closest base that actually contains the parameter
                  sub_search = _find_base_with_origin(
                          sub_search.__origin__, superclass_origin)
          else:
              return None
      return res
docs: Helper for _issubclass_Generic.