def copy_item(item):
    """
    Copy the item using its copy() function.
    Return item if it does not have a copy function.

    :param item: the item to be copied
    :return: the copied item
    """
    copy_function = getattr(item, 'copy', None)
    if callable(copy_function):
        return item.copy()
    else:
        return item
