def _create_link(self, other):
    """Internal. Used to create a shared dictionary."""
    # This works well for assert_shape and AssertFunction; but it can break
    # easily if the order of calls to forward() is not known in advance.
    self._linked = True
    self._defined_shapes = other._defined_shapes  # pylint: disable=protected-access
Internal. Used to create a shared dictionary.
trax/layers/assert_shape.py