def format_relative_time(datetime):
    """
    Return a string formatted timedelta of the given datetime with respect to the current datetime

    :param datetime: the datetime to format
    :return: string representation of the relative time since the given datetime
    """
    from aiida.common.utils import str_timedelta
    from aiida.common import timezone
    timedelta = timezone.delta(datetime, timezone.now())
    return str_timedelta(timedelta, negative_to_zero=True, max_num_fields=1)
