def METHOD_NAME(client, file_annotation,
                          parent_type="Image", link_count=0):
    """
    Check validity of file annotation. If hasFileAnnotation, check the size,
    name and number of objects linked to the original file.
    """
    assert file_annotation is not None
    id = file_annotation.getId().getValue()
    assert id > 0
    orig_file = file_annotation.getFile()
    assert orig_file.getSize().getValue() > 0
    assert orig_file.getName().getValue() is not None
    conn = BlitzGateway(client_obj=client)
    wrapper = conn.getObject("FileAnnotation", id)
    links = sum(1 for i in wrapper.getParentLinks(parent_type))
    conn.close()
    assert links == link_count