code: def __tf_flatten__(self):
      metadata = (self.mask,)
      components = (self.value1, self.value2)
      return metadata, components
  
imports: import dataclasses
  from typing import Any
  from tensorflow.core.function.trace_type import custom_nest_trace_type
  from tensorflow.core.function.trace_type import default_types
  from tensorflow.python.platform import test
  from tensorflow.python.types import trace
label_desc: Use image node_id 1 for calling the MaskedValuePair obj's underlying member method code with example usage: obj.__tf_flatten__() and returns: metadata,  components