code: def match(self, path):
          
          this = self.segments
          that = path.split('/')
          current_var = None
          bindings = {}
          segment_count = self.segment_count
          j = 0
          for i in range(0, len(this)):
              if j >= len(that):
                  break
              if this[i].kind == _TERMINAL:
                  if this[i].literal == '*':
                      bindings[current_var] = that[j]
                      j += 1
                  elif this[i].literal == '**':
                      until = j + len(that) - segment_count + 1
                      segment_count += len(that) - segment_count
                      bindings[current_var] = '/'.join(that[j:until])
                      j = until
                  elif this[i].literal != that[j]:
                      raise ValidationException(
                          'mismatched literal: \'%s\' != \'%s\'' % (
                              this[i].literal, that[j]))
                  else:
                      j += 1
              elif this[i].kind == _BINDING:
                  current_var = this[i].literal
          if j != len(that) or j != segment_count:
              raise ValidationException(
                  'match error: could not render from the path template: {}'
                  .format(path))
          return bindings
docs: Matches a fully qualified path template string.
  
          Args:
              path (str): A fully qualified path template string.
  
          Returns:
              dict: Var names to matched binding values.
  
          Raises:
              ValidationException: If path can't be matched to the template.