class_docstr: Convert bigquery result to context feature and example feature pair.
class_docstr_tok: ["Convert","bigquery","result","to","context","feature","and","example","feature","pair","."]
code: def process(
      self, instance: Dict[str, Any]
  ) -> Iterable[Tuple[bytes, tf.train.Example]]:
      context_feature = dict(
          (k, instance[k])
          for k in instance.keys()
          if k in self._context_feature_fields
      )
      context_feature_proto = utils.row_to_example(
          self._type_map, context_feature
      )
      context_feature_key = context_feature_proto.SerializeToString(
          deterministic=True
      )
      example_feature = dict(
          (k, instance[k])
          for k in instance.keys()
          if k not in self._context_feature_fields
      )
      example_feature_value = utils.row_to_example(
          self._type_map, example_feature
      )
      yield (context_feature_key, example_feature_value)
  
file_path: tfx/tfx/extensions/google_cloud_big_query/experimental/elwc_example_gen/component/executor.py
imports: from typing import Any, Dict, Iterable, List, Set, Tuple
  import apache_beam
  from google.cloud import bigquery
  import tensorflow
  from tfx.components.example_gen import base_example_gen_executor
  from tfx.extensions.google_cloud_big_query import utils
  from tfx.extensions.google_cloud_big_query.experimental.elwc_example_gen.proto import elwc_config_pb2
  from tfx.proto import example_gen_pb2
  from google.protobuf import json_format
  from tensorflow_serving.apis import input_pb2
label_desc: Use image node_id 2 for calling the _RowToContextFeatureAndExample obj's underlying member method code with example usage: obj.process(instance) without return types