code: def get_partitioned_types(
      config: ConfigSchema, side: Side
  ) -> Tuple[int, Set[EntityName], Set[EntityName]]:
      """Return the number of partitions on a given side and the entity types
  
      Each of the entity types that appear on the given side (LHS or RHS) of a relation
      type is split into some number of partitions. The ones that are split into one
      partition are called "unpartitioned" and behave as if all of their entities
      belonged to all buckets. The other ones are the "properly" partitioned ones.
      Currently, they must all be partitioned into the same number of partitions. This
      function returns that number, the names of the unpartitioned entity types and the
      names of the properly partitioned entity types.
  
      """
      entity_names_by_num_parts: Dict[
          int, Set[EntityName]
      ] = defaultdict(set)
      for relation_config in config.relations:
          entity_name = side.pick(
              relation_config.lhs, relation_config.rhs
          )
          entity_config = config.entities[entity_name]
          entity_names_by_num_parts[entity_config.num_partitions].add(
              entity_name
          )
  
      unpartitioned_entity_names = entity_names_by_num_parts.pop(
          1, set()
      )
  
      if len(entity_names_by_num_parts) == 0:
          return 1, unpartitioned_entity_names, set()
      if len(entity_names_by_num_parts) > 1:
          raise RuntimeError(
              "Currently num_partitions must be a single "
              "value across all partitioned entities."
          )
      (
          (num_partitions, partitioned_entity_names),
      ) = entity_names_by_num_parts.items()
      return (
          num_partitions,
          unpartitioned_entity_names,
          partitioned_entity_names,
      )
  
imports: import logging
  import multiprocessing
  import multiprocessing.pool
  import os
  import os.path
  import sys
  from collections import defaultdict
  from functools import partial
  from typing import Any, Callable, Dict, Iterable, List, Mapping, MutableMapping, Optional, Set, Tuple, TypeVar, Union
  import torch
  import torch.multiprocessing
  from torch.optim import Optimizer
  from torchbiggraph.config import ConfigSchema
  from torchbiggraph.types import Bucket, EntityName, FloatTensorType, Partition, Side
label_desc: Use image node_id 15 for calling a global function with example usage: get_partitioned_types(config, side) and returns: num_partitions,  unpartitioned_entity_names,  partitioned_entity_names, int,  unpartitioned_entity_names,  set