def pprint_relativedelta(delta):
    """
    Return a string representation of a relativedelta object in the form
    similar to: "1y 2m 3d 5h 6m". If any of the components is equal to zero,
    it's omitted.
    """
    ret = ''
    if delta.years:
        ret += '{}y '.format(delta.years)
    if delta.months:
        ret += '{}m '.format(delta.months)
    if delta.days:
        ret += '{}d '.format(delta.days)
    if delta.hours:
        ret += '{}h '.format(delta.hours)
    if delta.minutes:
        ret += '{}m '.format(delta.minutes)
    ret += '{}s'.format(delta.seconds)
    return ret