class_docstr: Importer class to create the backend module.
class_docstr_tok: ["Importer","class","to","create","the","backend","module","."]
code: def _create_backend_module(self, backend_name):
      backend = self._import_backend(backend_name)
  
      new_module = types.ModuleType(self._path)
      new_module.__file__ = backend.__file__
  
      for module_name, attributes in BACKEND_ATTRIBUTES.items():
          if module_name:
              try:
                  submodule = getattr(backend, module_name)
              except AttributeError:
                  raise RuntimeError(
                      f"Backend '{backend_name}' exposes no '{module_name}' module"
                  ) from None
              new_submodule = types.ModuleType(
                  f"{self._path}.{module_name}"
              )
              new_submodule.__file__ = submodule.__file__
              setattr(new_module, module_name, new_submodule)
          else:
              submodule = backend
              new_submodule = new_module
          for attribute_name in attributes:
              try:
                  submodule_ = submodule
                  if module_name == "" and not hasattr(
                      submodule, attribute_name
                  ):
                      submodule_ = common
                  attribute = getattr(submodule_, attribute_name)
  
              except AttributeError:
                  if module_name:
                      error = (
                          f"Module '{module_name}' of backend '{backend_name}' "
                          f"has no attribute '{attribute_name}'"
                      )
                  else:
                      error = (
                          f"Backend '{backend_name}' has no "
                          f"attribute '{attribute_name}'"
                      )
  
                  raise RuntimeError(error) from None
              else:
                  setattr(new_submodule, attribute_name, attribute)
  
      return new_module
  
file_path: geomstats/geomstats/_backend/__init__.py
imports: import importlib
  import logging
  import os
  import sys
  import types
  import geomstats._backend._common
label_desc: Use image node_id 3 for calling the BackendImporter obj's underlying member method code with example usage: obj._create_backend_module(backend_name) and returns: new_module