def METHOD_NAME(drop_event):
    r"""Extracts data from a drop event. This data should be embedded in the
    mimedata as a json text string.
    Parameters
    ----------
    drop_event : QDropEvent
        A drop event.
    Returns
    -------
    dict
        A data dictionary. The 'type' key identifies the type of data that is
        being dropped.
    """
    mimedata = drop_event.mimeData()
    # Reject unknown mimedata
    if not mimedata.hasText() and not mimedata.hasUrls():
        oslogger.warning(u'No text data')
        return INVALID_DATA
    # Process url mimedata
    if mimedata.hasUrls():
        urls = mimedata.urls()
        if len(urls) == 0:
            return INVALID_DATA
        url = urls[0]
        if not url.isLocalFile():
            return INVALID_DATA
        path = str(url.toLocalFile())
        data = {
            u'type': u'url-local',
            u'url': path
        }
        return data
    # Process JSON text data
    text = str(mimedata.text())
    try:
        data = json.loads(text)
    except:
        oslogger.warning(u'Failed to load json mime data')
        return INVALID_DATA
    if not isinstance(data, dict) or u'type' not in data:
        return INVALID_DATA
    return data