code: def test_experiment_with_session_tags_differs_field(self):
      self.session_1_start_info_ = """
              hparams: [
                {key: 'bool_hparam_differs_true' value: {bool_value: false}},
                {key: 'bool_hparam_differs_true' value: {bool_value: true}},
                {key: 'float_hparam_differs_false' value: {number_value: 1024}},
                {key: 'float_hparam_differs_true' value: {number_value: 0.01}},
                {key: 'string_hparams_differs_false' value: {string_value: 'momentum'}},
                {key: 'string_hparams_differs_true' value: {string_value: 'CNN'}}
              ]
          """
      self.session_2_start_info_ = """
              hparams:[
                {key: 'bool_hparam_differs_true' value: {bool_value: false}},
                {key: 'float_hparam_differs_false' value: {number_value: 1024}},
                {key: 'float_hparam_differs_true' value: {number_value: 0.02}},
                {key: 'string_hparams_differs_false' value: {string_value: 'momentum'}},
                {key: 'string_hparams_differs_true' value: {string_value: 'LATTICE'}}
              ]
          """
      self.session_3_start_info_ = """
              hparams:[
                {key: 'bool_hparam_differs_false' value: {bool_value: false}},
                {key: 'bool_hparam_differs_true' value: {bool_value: false}},
                {key: 'float_hparam_differs_false' value: {number_value: 1024}},
                {key: 'float_hparam_differs_true' value: {number_value: 0.05}},
                {key: 'string_hparams_differs_false' value: {string_value: 'momentum'}},
                {key: 'string_hparams_differs_true' value: {string_value: 'CNN'}}
              ]
          """
      expected_exp = """
              hparam_infos: {
                name: 'bool_hparam_differs_false'
                type: DATA_TYPE_BOOL
                domain_discrete: {
                  values: [{bool_value: false}]
                }
                differs: false
              }
              hparam_infos: {
                name: 'bool_hparam_differs_true'
                type: DATA_TYPE_BOOL
                domain_discrete: {
                  values: [{bool_value: false}, {bool_value: true}]
                }
                differs: true
              }
              hparam_infos: {
                name: 'float_hparam_differs_false'
                type: DATA_TYPE_FLOAT64
                domain_interval {
                  min_value: 1024
                  max_value: 1024
                }
                differs: false
              }
              hparam_infos: {
                name: 'float_hparam_differs_true'
                type: DATA_TYPE_FLOAT64
                domain_interval {
                  min_value: 0.01
                  max_value: 0.05
                }
                differs: true
              }
              hparam_infos: {
                name: 'string_hparams_differs_false'
                type: DATA_TYPE_STRING
                domain_discrete: {
                  values: [{string_value: 'momentum'}]
                }
                differs: false
              }
              hparam_infos: {
                name: 'string_hparams_differs_true'
                type: DATA_TYPE_STRING
                domain_discrete: {
                  values: [{string_value: 'CNN'},
                           {string_value: 'LATTICE'}]
                }
                differs: true
              }
              metric_infos: {
                name: {group: '', tag: 'accuracy'}
              }
              metric_infos: {
                name: {group: '', tag: 'loss'}
              }
              metric_infos: {
                name: {group: 'eval', tag: 'loss'}
              }
              metric_infos: {
                name: {group: 'train', tag: 'loss'}
              }
          """
      actual_exp = self._experiment_from_metadata()
      _canonicalize_experiment(actual_exp)
      self.assertProtoEquals(expected_exp, actual_exp)
  
imports: import operator
  from unittest import mock
  import tensorflow
  from google.protobuf import text_format
  from tensorboard import context
  from tensorboard.data import provider
  from tensorboard.plugins import base_plugin
  from tensorboard.plugins.hparams import api_pb2
  from tensorboard.plugins.hparams import backend_context
  from tensorboard.plugins.hparams import metadata
  from tensorboard.plugins.hparams import plugin_data_pb2
label_desc: Use image node_id 9 for calling the BackendContextTest obj's underlying member method code with example usage: obj.test_experiment_with_session_tags_differs_field() without return types