code: def encode(self) -> execution_hook_pb2.PreExecutionOutput:
      return execution_hook_pb2.PreExecutionOutput(
          vars={
              key: _to_value(value)
              for key, value in (self.vars or {}).items()
          },
      )
  
file_path: tfx/tfx/dsl/hooks.py
imports: import abc
  from typing import Optional, Union
  import attr
  from tfx.orchestration import data_types_utils
  from tfx.proto.orchestration import execution_hook_pb2
  from ml_metadata.proto import metadata_store_pb2
label_desc: Use image node_id 1 for calling the BCLComponentPreOutput obj's underlying member method code with example usage: obj.encode() and returns: execution_hook_pb2