code: def _default_dropout_state_filter_visitor(substate):
      from tensorflow.python.keras.layers.legacy_rnn.rnn_cell_impl import (
          LSTMStateTuple,
      )  # pylint: disable=g-import-not-at-top
  
      if isinstance(substate, LSTMStateTuple):
          # Do not perform dropout on the memory state.
          return LSTMStateTuple(c=False, h=True)
      elif isinstance(substate, tensor_array_ops.TensorArray):
          return False
      return True
  
imports: import hashlib
  import numbers
  import sys
  import types
  import warnings
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import tensor_conversion
  from tensorflow.python.framework import tensor_shape
  from tensorflow.python.framework import tensor_util
  from tensorflow.python.keras.utils import generic_utils
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import nn_ops
  from tensorflow.python.ops import random_ops
  from tensorflow.python.ops import tensor_array_ops
  from tensorflow.python.util import nest
label_desc: Use image node_id 3 for calling a global function with example usage: _default_dropout_state_filter_visitor(substate) and returns: True, LSTMStateTuple, False