Convert one single `val` to MRC.

    This function may be used for control fields in MARC records.

    Args:,
        code (str): Code of the field.
        val (str): Value of the field.

    Returns:
        str: Correctly padded MRC line with field.

def val_to_mrc(code, val):
    """
    Convert one single `val` to MRC.

    This function may be used for control fields in MARC records.

    Args:,
        code (str): Code of the field.
        val (str): Value of the field.

    Returns:
        str: Correctly padded MRC line with field.
    """
    code = str(code)
    if len(code) < 3:
        code += (3 - len(code)) * " "

    return "%s   L %s" % (code, val)