code: def make_padding_config(
      padding_config: Union[
          PaddingConfig, Sequence[Tuple[int, int, int]]
      ]
  ) -> PaddingConfig:
      """Create PaddingConfig proto from list of triples of integers.
  
      Args:
        padding_config: either a PaddingConfig or a list of integer triples
          (edge_padding_low, edge_padding_high, interior_padding) representing the
          configuration of the padding operation.
  
      Returns:
        A `PaddingConfig` object.
      """
      if not isinstance(padding_config, PaddingConfig):
          triples = padding_config
          padding_config = PaddingConfig()
          for lo, hi, interior in triples:
              dimension = PaddingConfigDimension()
              dimension.edge_padding_low = lo
              dimension.edge_padding_high = hi
              dimension.interior_padding = interior
              padding_config.dimensions.append(dimension)
      return padding_config
  
imports: from __future__ import annotations
  import atexit
  import contextlib
  import enum
  import gzip
  import inspect
  import logging
  import os
  import threading
  from typing import Any, List, Mapping, Optional, Sequence, Tuple, Union
  import ml_dtypes
  import numpy
  from .None import xla_extension
label_desc: Use image node_id 22 for calling a global function with example usage: make_padding_config(padding_config) and returns: padding_config