code: def __attrs_post_init__(self) -> None:
      for rel_id, rel_config in enumerate(self.relations):
          if rel_config.lhs not in self.entities:
              raise ValueError(
                  "Relation type %s (#%d) has an unknown "
                  "left-hand side entity type %s"
                  % (rel_config.name, rel_id, rel_config.lhs)
              )
          if rel_config.rhs not in self.entities:
              raise ValueError(
                  "Relation type %s (#%d) has an unknown "
                  "right-hand side entity type %s"
                  % (rel_config.name, rel_id, rel_config.rhs)
              )
      if self.dynamic_relations:
          if len(self.relations) != 1:
              raise ValueError(
                  "When dynamic relations are in use only one "
                  "relation type must be defined."
              )
      # TODO Check that all partitioned entity types have the same number of
      # partitions
      # TODO Check that the batch size is a multiple of the batch negative number
      if self.loss_fn == "logistic" and self.comparator == "cos":
          logger.warning(
              "You have logistic loss and cosine distance. Are you sure?"
          )
  
      if self.disable_lhs_negs and self.disable_rhs_negs:
          raise ValueError(
              "Cannot disable negative sampling on both sides."
          )
  
      if self.background_io:
          logger.warning(
              "`background_io` is deprecated and will have no effect."
          )
  
imports: import argparse
  import importlib
  import logging
  import os.path
  import shutil
  import sys
  import tempfile
  import uuid
  from enum import Enum
  from itertools import chain
  from typing import Any, ClassVar, Dict, List, Optional
  import attr
  from attr.validators import optional
  from torchbiggraph.schema import DeepTypeError, extract_nested_type, has_origin, inject_nested_value, non_empty, non_negative, positive, Schema, schema
label_desc: Use image node_id 1 for calling the ConfigSchema obj's underlying member method code with example usage: obj.__attrs_post_init__() without return types