code: def _largest_integer_by_dtype(dt):
      """Helper returning the largest integer exactly representable by dtype."""
      if not _is_known_dtype(dt):
          raise TypeError("Unrecognized dtype: {}".format(dt.name))
      if dt.is_floating:
          return int(2 ** (np.finfo(dt.as_numpy_dtype).nmant + 1))
      if dt.is_integer:
          return np.iinfo(dt.as_numpy_dtype).max
      if dt.base_dtype == dtypes.bool:
          return int(1)
      # We actually can't land here but keep the case for completeness.
      raise TypeError("Unrecognized dtype: {}".format(dt.name))
  
imports: import functools
  import hashlib
  import numpy
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import tensor_shape
  from tensorflow.python.framework import tensor_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import array_ops_stack
  from tensorflow.python.ops import check_ops
  from tensorflow.python.ops import cond
  from tensorflow.python.ops import control_flow_ops
  from tensorflow.python.ops import linalg_ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import nn
  from tensorflow.python.util import tf_inspect
label_desc: Use image node_id 10 for calling a global function with example usage: _largest_integer_by_dtype(dt) and returns: int, np, int