def escape_quote_character_in_field(field_data: bytes, quotechar: bytes, escapechar: bytes) -> bytes:
    """
    >>> escape_quote_character_in_field('test'.encode('ISO-8859-1'), quotechar=b'"', escapechar=b'"')
    b'test'
    >>> escape_quote_character_in_field('te"st'.encode('ISO-8859-1'), quotechar=b'"', escapechar=b'"')
    b'te""st'

    """
    if quotechar in field_data:
        field_data = field_data.replace(quotechar, escapechar + quotechar)
    return field_data