parameters: (value)
return_statement: return value.flat if isinstance(value, Jagged) else value
docstring: Flatten value if it is a Jagged, return unchanged if it's a Tensor.
docstring_summary: Flatten value if it is a Jagged, return unchanged if it's a Tensor.
docstring_tokens: Flatten value if it is a Jagged return unchanged if it s a Tensor .
function: def flatten(value):
    """Flatten value if it is a Jagged, return unchanged if it's a Tensor."""
    return value.flat if isinstance(value, Jagged) else value
function_tokens: def flatten ( value ) : return value . flat if isinstance ( value , Jagged ) else value