parameters: (dataset_or_iterator)
return_statement: return nest.map_structure(
        lambda component_spec: component_spec._to_legacy_output_types(),  # pylint: disable=protected-access
        get_structure(dataset_or_iterator))
docstring: Returns the output shapes for elements of the input dataset / iterator.
  
    Args:
      dataset_or_iterator: A `tf.data.Dataset` or `tf.data.Iterator`.
  
    Returns:
      A (nested) structure of `tf.DType` objects matching the structure of
      dataset / iterator elements and specifying the shape of the individual
      components.
  
    @compatibility(TF2)
    This is a legacy API for inspecting the type signature of dataset elements. In
    TF 2, you should use the `tf.data.Dataset.element_spec` attribute instead.
    @end_compatibility
docstring_summary: Returns the output shapes for elements of the input dataset / iterator.
docstring_tokens: Returns the output shapes for elements of the input dataset / iterator .
function: def get_legacy_output_types(dataset_or_iterator):
    """Returns the output shapes for elements of the input dataset / iterator.
  
    Args:
      dataset_or_iterator: A `tf.data.Dataset` or `tf.data.Iterator`.
  
    Returns:
      A (nested) structure of `tf.DType` objects matching the structure of
      dataset / iterator elements and specifying the shape of the individual
      components.
  
    @compatibility(TF2)
    This is a legacy API for inspecting the type signature of dataset elements. In
    TF 2, you should use the `tf.data.Dataset.element_spec` attribute instead.
    @end_compatibility
    """
    return nest.map_structure(
        lambda component_spec: component_spec._to_legacy_output_types(),  # pylint: disable=protected-access
        get_structure(dataset_or_iterator))
function_tokens: def get_legacy_output_types ( dataset_or_iterator ) : return nest . map_structure ( lambda component_spec : component_spec . _to_legacy_output_types ( ) , # pylint: disable=protected-access get_structure ( dataset_or_iterator ) )