Convert `dicts` under `code` to MRC. This is used to compose some of the
    data from user's input to MRC template, which is then converted to
    MARC XML / Dublin core.

    Args:
        code (str): Code of the aleph field, whic hshould be used.
        dicts (dict): Dict with aleph fields (i1/i2, a..z, 0..9) and
            informations in this fields.

    Returns:
        list: List of lines with MRC data.

def dicts_to_mrc(code, dicts):
    """
    Convert `dicts` under `code` to MRC. This is used to compose some of the
    data from user's input to MRC template, which is then converted to
    MARC XML / Dublin core.

    Args:
        code (str): Code of the aleph field, whic hshould be used.
        dicts (dict): Dict with aleph fields (i1/i2, a..z, 0..9) and
            informations in this fields.

    Returns:
        list: List of lines with MRC data.
    """
    def _dict_to_mrc(code, d):
        i1 = d.get("i1", d.get("ind1"))
        i2 = d.get("i2", d.get("ind2"))

        one_chars = [k for k in d.keys() if len(k) == 1]
        out = "%s%s%s L " % (code, i1, i2)
        for key in resorted(one_chars):
            for item in d[key]:
                out += "$$%s%s" % (key, item)

        return out

    return [
        _dict_to_mrc(code, d)
        for d in dicts
    ]