from typing import Iterable
from typing import Tuple


def atomtypes_atomnums_to_atoms(
    atomtypes: Iterable[str], atomnums: Iterable[int]
) -> Tuple[str, ...]:
    """Return list representation for atom in use.

    Parameters
    ------------
    atomtypes: list
        atom names
    atomnums: list
        atom numbers

    Examples
    --------
    >>> test_nums = [2, 3, 2, 1]
    >>> test_elements = ['Si', 'Ag', 'H', 'Si']
    >>> atomtypes_atomnums_to_atoms(test_elements, test_nums)
    ('Si', 'Si', 'Ag', 'Ag', 'Ag', 'H', 'H', 'Si')

    """
    atoms = []
    for elem, nums in zip(atomtypes, atomnums):
        for _ in range(nums):
            atoms.append(elem)
    return tuple(atoms)