class_docstr: A module holding the result of tokenization.
  
  ---
  name: Tokenization
  citation:
      author: Galkin
      year: 2021
      link: https://arxiv.org/abs/2106.12144
      github: https://github.com/migalkin/NodePiece
class_docstr_tok: ["A","module","holding","the","result","of","tokenization",".","--","-","name",":","Tokenization","citation",":","author",":","Galkin","year",":","2021","link",":","https",":","\/\/arxiv.org\/abs\/2106.12144","github",":","https",":","\/\/github.com\/migalkin\/NodePiece"]
docstr: Save the assignment to a file.
  
  :param output_path:
      the output file path. Its parent directories will be created if necessary.
docstr_tok: ["Save","the","assignment","to","a","file",".",":","param","output_path",":","the","output","file","path",".","Its","parent","directories","will","be","created","if","necessary","."]
code: def save_assignment(self, output_path: pathlib.Path):
      """Save the assignment to a file.
  
      :param output_path:
          the output file path. Its parent directories will be created if necessary.
      """
      output_path.parent.mkdir(parents=True, exist_ok=True)
      torch.save(self.assignment, output_path)
      logger.info(
          f"Saved assignment of shape {self.assignment.shape} to {output_path}"
      )
  
imports: import logging
  import pathlib
  from typing import Callable, Iterable, List, NamedTuple, Optional, Union
  import torch
  from class_resolver import HintOrType, OneOrManyHintOrType, OneOrManyOptionalKwargs, OptionalKwargs
  from docdata import parse_docdata
  from .tokenization import Tokenizer, tokenizer_resolver
  from ..combination import ConcatAggregationCombination
  from ..perceptron import ConcatMLP
  from ..representation import CombinedRepresentation, Representation
  from ..utils import ShapeError
  from ...triples import CoreTriplesFactory
  from ...typing import MappedTriples, OneOrSequence
  from ...utils import broadcast_upgrade_to_sequences
label_desc: Use image node_id 6 for calling the TokenizationRepresentation obj's underlying member method code with example usage: obj.save_assignment(output_path) without return types