def findMeshReferenceImage(overlayList, overlay):
    """Searches the :class:`.OverlayList` and tries to identify a reference
    image for the given :class:`.Mesh` overlay. Returns the identified
    overlay, or ``None`` if one can't be found.
    """
    import fsl.data.vtk as fslvtk
    if not isinstance(overlay, fslvtk.VTKMesh):
        return None
    try:
        prefix = fslvtk.getFIRSTPrefix(overlay.dataSource)
        for ovl in overlayList:
            if prefix.startswith(ovl.name):
                return ovl
    except Exception:
        pass
    return None
