def is_definition(cursor):
    """Test if a cursor refers to a definition

    This occurs when the cursor has a definition, and shares the location of that definiton
    """
    defn = cursor.get_definition()
    return defn is not None and cursor.location == defn.location
