keras/src/layers/core/identity.py/Identity/compute_output_spec
class Identity:    def compute_output_spec(self, inputs):
        return tree.map_structure(
            lambda x: KerasTensor(x.shape, dtype=x.dtype, sparse=x.sparse),
            inputs,
        )