class_docstr: ImageDecoderInterface implementation based on tensorflow library.
  
  This image decoder only supports image formats supported by:
  tf.image.decode_image, ['bmp', 'gif', 'jpeg', 'png'].
  
  Image sizes are computed using tf.image.decode_image, which requires tf.
  Initializating and pickling tf objects can be non-trivial, so:
  - Initialization is done lazily when get_sizes computation is needed.
  - __reduce__() is overridden so that tf state is ignored. It is lazily
    initialized as needed, after deserialization.
docstr: Returns the image format name for each value if it represents an image.
  
  Args:
    values: a list of value in bytes to check the image format.
  
  Returns:
    A list of image format name (e.g. 'JPG'/'GIF'/etc, or None if the
    value is not an image) in the same order as the input value list.
code: def get_formats(  # pytype: disable=signature-mismatch  # overriding-parameter-type-checks
      self, values: List[object]
  ) -> np.ndarray:
      """Returns the image format name for each value if it represents an image.
  
      Args:
        values: a list of value in bytes to check the image format.
  
      Returns:
        A list of image format name (e.g. 'JPG'/'GIF'/etc, or None if the
        value is not an image) in the same order as the input value list.
      """
  
      def get_image_format(image_bytes):
          for (
              image_format,
              signature,
          ) in _IMAGE_FORMAT_SIGNATURES.items():
              if bytes(image_bytes[: len(signature)]) == signature:
                  return image_format
          return None
  
      return np.vectorize(get_image_format, otypes=[object])(values)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import abc
  import collections
  from typing import Iterable, List, Optional, Text
  import numpy
  import pandas
  import pyarrow
  import six
  import tensorflow
  from tensorflow_data_validation import types
  from tensorflow_data_validation.statistics.generators import stats_generator
  from tensorflow_data_validation.utils import stats_util
  from tfx_bsl.arrow import array_util
  from tensorflow_metadata.proto.v0 import statistics_pb2
label_desc: Use image node_id 4 for calling the TfImageDecoder obj's underlying member method code with example usage: obj.get_formats(values) and returns: np, None, image_format