src/canvas-extractor/edfi_canvas_extractor/api/canvas_helper.py
def remove_duplicates(list: List, identity_property: str) -> List:
    """
    Remove duplicate objects from a list, using a property as the object identity

    Parameters
    ----------
    list: List
        a list of objects
    identity_property: str
        the name of the object property to use as the object identity

    Returns
    -------
    List
        a list of objects with duplicates removed
    """
    unique_dict: Dict = dict()
    for obj in list:
        if getattr(obj, identity_property) not in unique_dict:
            unique_dict[getattr(obj, identity_property)] = obj
    return [*unique_dict.values()]

    Remove duplicate objects from a list, using a property as the object identity

    Parameters
    ----------
    list: List
        a list of objects
    identity_property: str
        the name of the object property to use as the object identity

    Returns
    -------
    List
        a list of objects with duplicates removed
    
Remove duplicate objects from a list, using a property as the object identity
Parameters

List
a list of objects
identity_property: str
the name of the object property to use as the object identity

Returns

List
a list of objects with duplicates removed
Remove duplicate objects from a list using a property as the object identity Parameters List a list of objects identity_property : str the name of the object property to use as the object identity Returns List a list of objects with duplicates removed
def remove_duplicates(list: List, identity_property: str) -> List:
    unique_dict: Dict = dict()
    for obj in list:
        if getattr(obj, identity_property) not in unique_dict:
            unique_dict[getattr(obj, identity_property)] = obj
    return [*unique_dict.values()]
def remove_duplicates ( list : List , identity_property : str ) -> List : unique_dict : Dict = dict ( ) for obj in list : if getattr ( obj , identity_property ) not in unique_dict : unique_dict [ getattr ( obj , identity_property ) ] = obj return [ * unique_dict . values ( ) ]
Remove duplicate objects from a list, using a property as the object identity
Parameters
Remove duplicate objects from a list using a property as the object identity Parameters
"""
    Remove duplicate objects from a list, using a property as the object identity

    Parameters
    ----------
    list: List
        a list of objects
    identity_property: str
        the name of the object property to use as the object identity

    Returns
    -------
    List
        a list of objects with duplicates removed
    """
list
List
identity_property
str