docs: def from_atomic_fractions(cls, atomic_fractions, formula=None):
          """
          Creates a composition from an atomic fraction :class:`dict`.
  
          Args:
              atomic_fractions (dict): atomic fraction :class:`dict`.
                  The keys are atomic numbers and the values atomic fractions.
                  Wildcard are accepted, e.g. ``{5: '?', 25: 0.4}`` where boron
                  will get a atomic fraction of 0.6.
              formula (str): optional chemical formula for the composition.
                  If ``None``, a formula will be generated for the composition.
          """
          atomic_fractions = process_wildcard(atomic_fractions)
          mass_fractions = convert_atomic_to_mass_fractions(atomic_fractions)
          if not formula:
              formula = generate_name(atomic_fractions)
          return cls(cls._key, mass_fractions, atomic_fractions, formula)