code: def make_tsv(
      config: ConfigSchema,
      entities_tf: TextIO,
      relation_types_tf: TextIO,
  ) -> None:
      print("Loading relation types and entities...")
      entity_storage = ENTITY_STORAGES.make_instance(config.entity_path)
      relation_type_storage = RELATION_TYPE_STORAGES.make_instance(
          config.entity_path
      )
  
      print("Initializing model...")
      model = make_model(config)
  
      print("Loading model check point...")
      checkpoint_manager = CheckpointManager(config.checkpoint_path)
      state_dict, _ = checkpoint_manager.read_model()
      if state_dict is not None:
          model.load_state_dict(state_dict, strict=False)
  
      make_tsv_for_entities(
          model, checkpoint_manager, entity_storage, entities_tf
      )
      make_tsv_for_relation_types(
          model, relation_type_storage, relation_types_tf
      )
  
file_path: PyTorch-BigGraph/torchbiggraph/converters/export_to_tsv.py
imports: import argparse
  from typing import Iterable, TextIO
  from torchbiggraph.checkpoint_manager import CheckpointManager
  from torchbiggraph.config import ConfigFileLoader, ConfigSchema
  from torchbiggraph.graph_storages import AbstractEntityStorage, AbstractRelationTypeStorage, ENTITY_STORAGES, RELATION_TYPE_STORAGES
  from torchbiggraph.model import make_model, MultiRelationEmbedder
label_desc: Use image node_id 2 for calling a global function with example usage: make_tsv(config, entities_tf, relation_types_tf) without return types