code: def _features_to_raw_params(features, types):
      """Split feature tuples into raw params used by `gen_parsing_ops`.
  
      Args:
          features: A `dict` mapping feature keys to objects of a type in `types`.
          types: Type of features to allow, among `FixedLenFeature`, `VarLenFeature`,
              `SparseFeature`, and `FixedLenSequenceFeature`.
  
      Returns:
          Tuple of `sparse_keys`, `sparse_types`, `dense_keys`, `dense_types`,
          `dense_defaults`, `dense_shapes`.
  
      Raises:
          ValueError: if `features` contains an item not in `types`, or an invalid
          feature.
      """
      sparse_keys = []
      sparse_types = []
      sparse_ranks = []
      dense_keys = []
      dense_types = []
      # When the graph is built twice, multiple dense_defaults in a normal dict
      # could come out in different orders. This will fail the _e2e_test which
      # expects exactly the same graph.
      # OrderedDict which preserves the order can solve the problem.
      dense_defaults = collections.OrderedDict()
      dense_shapes = []
      if features:
          # NOTE: We iterate over sorted keys to keep things deterministic.
          for key in sorted(features.keys()):
              feature = features[key]
              if isinstance(
                  feature,
                  tensorflow_io.experimental.columnar.VarLenFeatureWithRank,
              ):
                  _handle_varlen_feature(
                      feature,
                      key,
                      sparse_keys,
                      sparse_types,
                      sparse_ranks,
                      types,
                  )
              elif isinstance(feature, tf.io.SparseFeature):
                  _handle_sparse_feature(
                      feature,
                      key,
                      sparse_keys,
                      sparse_types,
                      sparse_ranks,
                      types,
                  )
              elif isinstance(feature, tf.io.FixedLenFeature):
                  _handle_fixedlen_feature(
                      dense_defaults,
                      dense_keys,
                      dense_shapes,
                      dense_types,
                      feature,
                      key,
                      types,
                  )
              else:
                  raise ValueError(f"Invalid feature {key}:{feature}.")
      return (
          sparse_keys,
          sparse_types,
          sparse_ranks,
          dense_keys,
          dense_types,
          dense_defaults,
          dense_shapes,
      )
  
file_path: io/tensorflow_io/python/experimental/parse_avro_ops.py
imports: import collections
  import re
  import tensorflow
  import tensorflow_io
  from tensorflow_io.python.ops import core_ops
label_desc: Use image node_id 6 for calling a global function with example usage: _features_to_raw_params(features, types) and returns: sparse_keys,  sparse_types,  sparse_ranks,  dense_keys,  dense_types,  dense_defaults,  dense_shapes