def METHOD_NAME(input_signature: InputSignature):
    xs = tf.nest.flatten(input_signature)
    ys = []
    for i, spec in enumerate(xs):
        ys.append(tf.TensorSpec.from_spec(spec, name=spec.name if spec.name else f"input_{i}"))
    return tf.nest.pack_sequence_as(input_signature, ys)