class_docstr: Represents the contents of a hub.Module before it has been instantiated.
  
  Warning: Deprecated. This belongs to the hub.Module API and TF1 Hub format.
  For TF2, switch to plain SavedModels and hub.load().
  
  A ModuleSpec is the blueprint used by `Module` to create one or more instances
  of a specific module in one or more graphs. The details on how to construct
  the Module are internal to the library implementation but methods to inspect
  a Module interface are public.
  
  Note: Do not instantiate this class directly. Use `hub.load_module_spec` or
  `hub.create_module_spec`.
  
  THIS FUNCTION IS DEPRECATED.
docstr: Exports a ModuleSpec with weights taken from a checkpoint.
  
  This is an helper to export modules directly from a ModuleSpec
  without having to create a session and set the variables to the
  intended values.
  
  Example usage:
  
  ```python
  spec = hub.create_module_spec(module_fn)
  spec.export("/path/to/export_module",
              checkpoint_path="/path/to/training_model")
  ```
  
  In some cases, the variable name in the checkpoint does not match
  the variable name in the module. It is possible to work around that
  by providing a checkpoint_map_fn that performs the variable mapping.
  For example with: `name_transform_fn = lambda x: "extra_scope/" + x`.
  
  Args:
    path: path where to export the module to.
    _sentinel: used to prevent positional arguments besides `path`.
    checkpoint_path: path where to load the weights for the module.
      Mandatory parameter and must be passed by name.
    name_transform_fn: optional function to provide mapping between
      variable name in the module and the variable name in the checkpoint.
  
  Raises:
    ValueError: if missing mandatory `checkpoint_path` parameter.
code: def export(
      self,
      path,
      _sentinel=None,  # pylint: disable=invalid-name
      checkpoint_path=None,
      name_transform_fn=None,
  ):
      """Exports a ModuleSpec with weights taken from a checkpoint.
  
      This is an helper to export modules directly from a ModuleSpec
      without having to create a session and set the variables to the
      intended values.
  
      Example usage:
  
      ```python
      spec = hub.create_module_spec(module_fn)
      spec.export("/path/to/export_module",
                  checkpoint_path="/path/to/training_model")
      ```
  
      In some cases, the variable name in the checkpoint does not match
      the variable name in the module. It is possible to work around that
      by providing a checkpoint_map_fn that performs the variable mapping.
      For example with: `name_transform_fn = lambda x: "extra_scope/" + x`.
  
      Args:
        path: path where to export the module to.
        _sentinel: used to prevent positional arguments besides `path`.
        checkpoint_path: path where to load the weights for the module.
          Mandatory parameter and must be passed by name.
        name_transform_fn: optional function to provide mapping between
          variable name in the module and the variable name in the checkpoint.
  
      Raises:
        ValueError: if missing mandatory `checkpoint_path` parameter.
      """
      from tensorflow_hub.module import (
          export_module_spec,
      )  # pylint: disable=g-import-not-at-top
  
      if not checkpoint_path:
          raise ValueError(
              "Missing mandatory `checkpoint_path` parameter"
          )
      name_transform_fn = name_transform_fn or (lambda x: x)
      export_module_spec(self, path, checkpoint_path, name_transform_fn)
  
file_path: hub/tensorflow_hub/module_spec.py
imports: import abc
label_desc: Use image node_id 2 for calling the ModuleSpec obj's underlying member method code with example usage: obj.export(path, _sentinel, checkpoint_path, name_transform_fn) without return types