docs: def resolve(self, word, mandatory=True):
          '''
          composite mapping
          given f(x) and g(x)
          here: localtt & globaltt respectivly
          return g(f(x))|g(x)||f(x)|x in order of preference
          returns x on fall through if finding a mapping
          is not mandatory (by default finding is mandatory).
  
          This may be specialized further from any mapping
          to a global mapping only; if need be.
  
          :param word:  the srting to find as a key in translation tables
          :param  mandatory: boolean to cauae failure when no key exists
  
          :return
              value from global translation table,
              or value from local translation table,
              or the query key if finding a value is not mandatory (in this order)
  
          '''
  
          assert word is not None
  
          # we may not agree with a remote sources use of our global term we have
          # this provides oppertunity for us to overide
          if word in self.localtt:
              label = self.localtt[word]
              if label in self.globaltt:
                  term_id = self.globaltt[label]
              else:
                  logging.info(
                      "Translated to '%s' but no global term_id for: '%s'", label, word)
                  term_id = label
          elif word in self.globaltt:
              term_id = self.globaltt[word]
          else:
              if mandatory:
                  raise KeyError("Mapping required for: ", word)
  
              logging.warning("We have no translation for: '%s'", word)
              term_id = word
          return term_id