docs: def _variant_to_dsl_helper(tokens) -> Variant:
      """Convert variant tokens to DSL objects.
  
      :type tokens: ParseResult
      """
      kind = tokens[KIND]
  
      if kind == HGVS:
          return hgvs(tokens[IDENTIFIER])
  
      if kind == GMOD:
          return gmod(
              name=tokens[IDENTIFIER][NAME],
              namespace=tokens[IDENTIFIER][NAMESPACE],
          )
  
      if kind == PMOD:
          return pmod(
              name=tokens[IDENTIFIER][NAME],
              namespace=tokens[IDENTIFIER][NAMESPACE],
              code=tokens.get(PMOD_CODE),
              position=tokens.get(PMOD_POSITION),
          )
  
      if kind == FRAGMENT:
          start, stop = tokens.get(FRAGMENT_START), tokens.get(FRAGMENT_STOP)
          return fragment(
              start=start,
              stop=stop,
              description=tokens.get(FRAGMENT_DESCRIPTION)
          )
  
      raise ValueError('invalid fragment kind: {}'.format(kind))