code: def _wraps(self, tokens):
          
          def _differ(tokens):
              inner, outer = tokens
              not_same_start = inner.get('start') != outer.get('start')
              not_same_end = inner.get('end') != outer.get('end')
              return not_same_start or not_same_end
  
          def _in_range(tokens):
              inner, outer = tokens
              starts_in = outer.get('start') <= inner.get('start') \
                  <= outer.get('end')
              ends_in = outer.get('start') <= inner.get('end') \
                  <= outer.get('end')
              return starts_in and ends_in
  
          if not _differ(tokens):
              return False
  
          return _in_range(tokens)
docs: determine if a token is wrapped by another token