code: def get_all_leaf_features(
      schema: schema_pb2.Schema,
  ) -> List[Tuple[types.FeaturePath, schema_pb2.Feature]]:
      """Returns all leaf features in a schema."""
  
      def _recursion_helper(
          parent_path: types.FeaturePath,
          feature_container: Iterable[schema_pb2.Feature],
          result: List[Tuple[types.FeaturePath, schema_pb2.Feature]],
      ):
          for f in feature_container:
              feature_path = parent_path.child(f.name)
              if f.type != schema_pb2.STRUCT:
                  result.append((feature_path, f))
              else:
                  _recursion_helper(
                      feature_path, f.struct_domain.feature, result
                  )
  
      result = []
      _recursion_helper(types.FeaturePath([]), schema.feature, result)
      return result
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import collections
  import logging
  from typing import Any, Iterable, List, Mapping, Optional, Set, Text, Tuple, Union
  from tensorflow_data_validation import types
  from tensorflow_data_validation.utils import io_util
  from google.protobuf import descriptor
  from google.protobuf import text_format
  from tensorflow_metadata.proto.v0 import schema_pb2
label_desc: Use image node_id 13 for calling a global function with example usage: get_all_leaf_features(schema) and returns: result