code: def _extend_2d_padding(padding, data_format):
      if isinstance(padding, str):
          return padding
      if isinstance(padding, int):
          padding = [(padding, padding)] * 2
      if data_format[-1] == "C":
          padding = [(0, 0)] + padding + [(0, 0)]
      else:
          padding = [(0, 0), (0, 0)] + padding
      return padding
  
imports: from typing import Optional, Tuple, Union, Sequence
  import tensorflow
  from tensorflow.python.types.core import Tensor
  import ivy
  from ivy.func_wrapper import with_supported_dtypes, with_unsupported_dtypes
  from .None import backend_version
  from ivy.functional.ivy.layers import _deconv_length, _get_x_data_format
label_desc: Use image node_id 4 for calling a global function with example usage: _extend_2d_padding(padding, data_format) and returns: padding, padding