code: def _get_available_class(base_class):
      '''
      Return an ordered dictionary with the available classes in the
      scalerel submodule with classes that derives from `base_class`,
      keyed by class name.
      '''
      gsims = {}
      for fname in os.listdir(os.path.dirname(__file__)):
          if fname.endswith('.py'):
              modname, _ext = os.path.splitext(fname)
              mod = importlib.import_module(
                  'openquake.hazardlib.scalerel.' + modname)
              for cls in mod.__dict__.values():
                  if inspect.isclass(cls) and issubclass(cls, base_class) \
                          and cls != base_class \
                          and not inspect.isabstract(cls):
                      gsims[cls.__name__] = cls
      return dict((k, gsims[k]) for k in sorted(gsims)f _get_available_class(base_class):
      '''
      Return an ordered dictionary with the available classes in the
      scalerel submodule with classes that derives from `base_class`,
      keyed by class name.
      '''
      gsims = {}
      for fname in os.listdir(os.path.dirname(__file__)):
          if fname.endswith('.py'):
              modname, _ext = os.path.splitext(fname)
              mod = importlib.import_module(
                  'openquake.hazardlib.scalerel.' + modname)
              for cls in mod.__dict__.values():
                  if inspect.isclass(cls) and issubclass(cls, base_class) \
                          and cls != base_class \
                          and not inspect.isabstract(cls):
                      gsims[cls.__name__] = cls
      return dict((k, gsims[k]) for k in sorted(gsims))
docs: Return an ordered dictionary with the available classes in the
      scalerel submodule with classes that derives from `base_class`,
      keyed by class name.