def METHOD_NAME(f, size):
    """Read the end of a file
    This skips to the next line to avoid starting in the middle of a unicode character.
    And returns "" in the case of a UnicodeDecodeError
    """
    f.seek(0, 2)
    end = f.tell()
    if end < 1024 * size:
        f.seek(0, 0)
    else:
        f.seek(end - (1024 * size))
    data = f.read()
    try:
        # Find the first newline in the block
        newline = min(1+data.find(b'\n'), len(data))
        text = data[newline:].decode("UTF-8")
    except UnicodeDecodeError:
        return ""
    return text