docs: def convert_mass_to_atomic_fractions(mass_fractions):
      """
      Converts a mass fraction :class:`dict` to an atomic fraction :class:`dict`.
  
      Args:
          mass_fractions (dict): mass fraction :class:`dict`.
              The composition is specified by a dictionary.
              The keys are atomic numbers and the values weight fractions.
              No wildcard are accepted.
      """
      atomic_fractions = {}
  
      for z, mass_fraction in mass_fractions.items():
          atomic_fractions[z] = mass_fraction / pyxray.element_atomic_weight(z)
  
      total_fraction = sum(atomic_fractions.values())
  
      for z, fraction in atomic_fractions.items():
          try:
              atomic_fractions[z] = fraction / total_fraction
          except ZeroDivisionError:
              atomic_fractions[z] = 0.0
  
      return atomic_fractions