def check_mantarray_serial_number(serial_number: str) -> str:
    """Check that a Mantarray Serial Number is valid."""
    if len(serial_number) > 9:
        return "Serial Number exceeds max length"
    if len(serial_number) < 9:
        return "Serial Number does not reach min length"
    if serial_number[:2] != "M0":
        return f"Serial Number contains invalid header: '{serial_number[:2]}'"
    for char in serial_number[2:]:
        if not char.isnumeric():
            return f"Serial Number contains invalid character: '{char}'"
    if int(serial_number[2:4]) < 20:
        return f"Serial Number contains invalid year: '{serial_number[2:4]}'"
    if int(serial_number[4:7]) < 1 or int(serial_number[4:7]) > 366:
        return f"Serial Number contains invalid Julian date: '{serial_number[4:7]}'"
    return ""