code: def _is_layer(obj):
      """Implicit check for Layer-like objects."""
      # TODO(b/110718070): Replace with isinstance(obj, tf.keras.layers.Layer).
      return hasattr(obj, "_is_layer") and not isinstance(obj, type)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import abc
  import typing
  import six
  import tensorflow
  import tensorflow_probability
  from tf_agents.distributions import utils
  from tf_agents.networks import layer_utils
  from tf_agents.specs import tensor_spec
  from tf_agents.trajectories import time_step
  from tf_agents.typing import types
  from tf_agents.utils import common
  from tf_agents.utils import nest_utils
  from tf_agents.utils import object_identity
  from tensorflow.python.trackable import base
  from tensorflow.python.util import tf_decorator
  from tensorflow.python.util import tf_inspect
label_desc: Use image node_id 1 for calling a global function with example usage: _is_layer(obj) and returns: unknown