code: def export(id_or_alias, output):
      db = read_checkpoint_db()
      checkpoint = get_checkpoint(db, id_or_alias)
      if not checkpoint:
          click.echo(
              "Checkpoint '{}' not found in index.".format(id_or_alias)
          )
          return
  
      # Create the tar that will contain the checkpoint.
      tar_path = os.path.join(
          os.path.abspath(os.path.expanduser(output)),
          "{}.tar".format(checkpoint["id"]),
      )
      checkpoint_path = get_checkpoint_path(checkpoint["id"])
      with tarfile.open(tar_path, "w") as f:
          # Add the config file. Dump the dict into a BytesIO, go to the
          # beginning of the file and pass it as a file to the tar.
          metadata_file = six.BytesIO()
          metadata_file.write(json.dumps(checkpoint).encode("utf-8"))
          metadata_file.seek(0)
  
          tarinfo = tarfile.TarInfo(name="metadata.json")
          tarinfo.size = len(metadata_file.getvalue())
          f.addfile(tarinfo=tarinfo, fileobj=metadata_file)
  
          metadata_file.close()
  
          # Add the files present in the checkpoint's directory.
          for filename in os.listdir(checkpoint_path):
              path = os.path.join(checkpoint_path, filename)
              f.add(path, filename)
  
      click.echo(
          "Checkpoint {} exported successfully.".format(
              checkpoint["id"]
          )
      )
  
imports: import click
  import json
  import os
  import shutil
  import six
  import requests
  import tarfile
  import tempfile
  import tensorflow
  import uuid
  from datetime import datetime
  from luminoth import __version__
  from luminoth.utils.config import get_config
  from luminoth.utils.homedir import get_luminoth_home
label_desc: Use image node_id 20 for calling a global function with example usage: export(id_or_alias, output) without return types