docs: def to_json(self):
          """Recreate a is_variant dictionary for :class:`BELGraph`.
  
          :return: Dictionary that describes a variant or a fusion.
          :rtype: Variant or FusionBase
          """
          if self.type == FUSION:
              return self._fusion_to_json()
  
          if self.type == FRAGMENT:
              return fragment(
                  start=int_or_str(self.p3_start),
                  stop=int_or_str(self.p3_stop),
              )
  
          if self.type == HGVS:
              return hgvs(str(self.variantString))
  
          if self.type == GMOD:
              return gmod(
                  namespace=self.identifier.namespace.keyword,
                  name=self.identifier.name,
                  identifier=self.identifier.identifier,
              )
  
          if self.type == PMOD:
              return pmod(
                  namespace=self.identifier.namespace.keyword,
                  name=self.identifier.name,
                  identifier=self.identifier.identifier,
                  code=self.residue,
                  position=self.position
              )
  
          raise TypeError('unhandled type ({}) for modification {}'.format(self.type, self))