def remove_tz_if_return_naive(dt, return_naive):
    """
    A helper function to strip tzinfo objects if return_naive is True.

    Returns a naive datetime object if return_naive is True.

    :type dt: datetime
    :param dt: The datetime

    :type return_naive: bool
    :param return_naive: Make datetime naive if True

    :rtype: datetime
    :returns: A naive dt if return_naive is True.
    """
    return dt.replace(tzinfo=None) if return_naive else dt
