code: def _make_dim_divisible(dim: int, divisor: int, name: str) -> int:
      dim_div, remainder = divmod(dim, divisor)
      if remainder:
          logger.warning(f"{name}={dim} not divisible by {divisor}.")
      dim = dim_div * divisor
      assert dim % divisor == 0
      return dim
  
imports: import logging
  import math
  from abc import ABC, abstractmethod
  from typing import Any, Iterable, Mapping, Optional, Sequence
  import torch
  from class_resolver import ClassResolver, Hint, HintOrType, OptionalKwargs
  from class_resolver.contrib.torch import activation_resolver
  from docdata import parse_docdata
  from torch import nn
  from .init import uniform_norm_p1_, xavier_normal_
  from .representation import LowRankRepresentation, Representation
  from .utils import ShapeError, adjacency_tensor_to_stacked_matrix, use_horizontal_stacking
  from .weighting import EdgeWeighting, edge_weight_resolver
  from ..triples import CoreTriplesFactory
  from ..utils import ExtraReprMixin, einsum
label_desc: Use image node_id 1 for calling a global function with example usage: _make_dim_divisible(dim, divisor, name) and returns: dim