docs: def resolve(label):
      '''
      composite mapping
      given f(x) and g(x)    here:  GLOBALTT & LOCALTT respectivly
      in order of preference
      return g(f(x))|f(x)|g(x) | x
      TODO consider returning x on fall through
      : return label's mapping
  
      '''
      term_id = label
      if label is not None and label in LOCALTT:
          term_id = LOCALTT[label]
          if term_id in GLOBALTT:
              term_id = GLOBALTT[term_id]
          else:
              LOG.warning(
                  'Local translation but do not have a global term_id for %s', label)
      elif label is not None and label in GLOBALTT:
          term_id = GLOBALTT[label]
      else:
          LOG.error('Do not have any mapping for label: ' + label)
      return term_id