def get_all_properties(data, **kws):
    """Get all property definitions from PV data.

    Parameters
    ----------
    data : list(dict)
        List of dict, each dict element is of the format:
        ``{'name': PV name (str), 'owner': str, 'properties': PV properties (list[dict]), 'tags': PV tags (list[dict])}``.

    Keyword Arguments
    -----------------
    name_only : True or False
        If true, only return list of property names.

    Returns
    -------
    ret : list of dict
        dict: {'name': property_name, 'value': None, 'owner': owner}
    """
    p_list = []
    for r in data:
        new_p = [
            {'name': p['name'], 'owner': p['owner'], 'value': None}
            for p in r['properties']
        ]
        [p_list.append(i) for i in new_p if i not in p_list]

    if kws.get('name_only', False):
        return sorted([p['name'] for p in p_list])
    else:
        return p_list