def find_duplicates(df, columns=None, take_last=False):
    """Locates duplicate values in a dataframe

    Args:
        df (`pandas.DataFrame`): The DataFrame to find duplicates in
        columns (`list`, optional): Spesific columns to find duplicates in
        take_last (bool, optional): Should the last duplicate not be marked as a duplicate?
            Defaults to `False`

    Returns:
        `pandas.DataFrame`: A frame containing duplicates
    """
    mask = df.duplicated(cols=columns, take_last=take_last)
    return df.loc[mask]