code: def is_ready(self):
      mapping_from = self.label_map.get(self.key[0], None)
      if mapping_from is None:
          # tf.logging.warning('could not find mapping key %s', self.key[0])
          return False
      mapping_to = self.label_map.get(self.key[1], None)
      if mapping_to is None:
          # tf.logging.warning('could not find mapping key %s', self.key[1])
          return False
      assert len(mapping_from) == len(mapping_to), (
          "mapping is not one-to-one, "
          "corrupted mapping file? {}".format(self.model_file)
      )
      return True
  
file_path: NiftyNet/niftynet/layer/discrete_label_normalisation.py
imports: from __future__ import absolute_import, print_function, division
  import os
  import numpy
  import tensorflow
  import niftynet.utilities.histogram_standardisation
  from niftynet.layer.base_layer import DataDependentLayer
  from niftynet.layer.base_layer import Invertible
  from niftynet.utilities.user_parameters_helper import standardise_string
  from niftynet.utilities.util_common import print_progress_bar
label_desc: Use image node_id 6 for calling the DiscreteLabelNormalisationLayer obj's underlying member method code with example usage: obj.is_ready() and returns: True, False, False