class_docstr: Create multi-modal instances given the path to triples.
class_docstr_tok: ["Create","multi-modal","instances","given","the","path","to","triples","."]
code: def to_path_binary(
      self, path: Union[str, pathlib.Path, TextIO]
  ) -> pathlib.Path:  # noqa: D102
      path = super().to_path_binary(path=path)
      # save literal-to-id mapping
      pandas.DataFrame(
          data=self.literals_to_id.items(),
          columns=["label", "id"],
      ).sort_values(by="id").set_index("id").to_csv(
          path.joinpath(f"{self.file_name_literal_to_id}.tsv.gz"),
          sep="\t",
      )
      # save numeric literals
      np.save(
          str(path.joinpath(self.file_name_numeric_literals)),
          self.numeric_literals,
      )
      return path
  
imports: import logging
  import pathlib
  from typing import Any, ClassVar, Dict, Iterable, Mapping, MutableMapping, Optional, TextIO, Tuple, Union
  import numpy
  import pandas
  import torch
  from .triples_factory import TriplesFactory
  from .utils import load_triples
  from ..typing import EntityMapping, LabeledTriples, MappedTriples
label_desc: Use image node_id 8 for calling the TriplesNumericLiteralsFactory obj's underlying member method code with example usage: obj.to_path_binary(path) and returns: path