from typing import Any


def copy(obj: Any) -> Any:
    """Function to copy objects like the ones used in this project: dicts,
    lists, PDFText, PDFTable, PDFContent, etc.


    Args:
        obj (Any): the object to be copied.

    Returns:
        Any: the copy of the object passed as argument.
    """
    if isinstance(obj, list):
        return [copy(el) for el in obj]
    elif isinstance(obj, dict):
        return {k: copy(v) for k, v in obj.items()}
    else:
        return obj