class_docstr: Abstract class for dialog problems.
code: def hparams(self, defaults, unused_model_hparams):
      p = defaults
      p.stop_at_eos = int(True)
  
      p.modality = {"targets": modalities.ModalityType.SYMBOL}
      if self.has_inputs:
          p.modality["inputs"] = modalities.ModalityType.SYMBOL
          p.vocab_size = {"inputs": self._encoders["inputs"].vocab_size}
      p.vocab_size["targets"] = self._encoders["inputs"].vocab_size
  
      if self.vocab_type == VocabType.CHARACTER:
          p.loss_multiplier = 2.0
  
      if self.packed_length:
          if self.has_inputs:
              p.modality[
                  "inputs_segmentation"
              ] = modalities.ModalityType.IDENTITY
              p.modality[
                  "inputs_position"
              ] = modalities.ModalityType.IDENTITY
              p.vocab_size["inputs_segmentation"] = None
              p.vocab_size["inputs_position"] = None
          p.modality[
              "targets_segmentation"
          ] = modalities.ModalityType.IDENTITY
          p.modality[
              "targets_position"
          ] = modalities.ModalityType.IDENTITY
          p.vocab_size["targets_segmentation"] = None
          p.vocab_size["targets_position"] = None
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import os
  import re
  import tarfile
  import zipfile
  import requests
  from tensor2tensor.data_generators import generator_utils
  from tensor2tensor.data_generators import problem
  from tensor2tensor.data_generators import text_encoder
  from tensor2tensor.data_generators import text_problems
  from tensor2tensor.data_generators.text_problems import VocabType
  from tensor2tensor.layers import modalities
  from tensor2tensor.utils import metrics
  import tensorflow.compat.v1
label_desc: Use image node_id 28 for calling the DialogAbstract obj's underlying member method code with example usage: obj.hparams(defaults, unused_model_hparams) without return types