def prepare_s3_prefix(bucket, pre_date_part, y=None, mo=None, d=None, h=
    None, after_date_part=''):
    """
    compose an s3 path from given parts and date values
    example:
        {bucket}/{pre_date_part}/mo={y}-{mo}/day={d}/hour={h}/after_date_part
    Parameters
    ----------
    bucket
        bucket name, may include "s3://"
    pre_date_part
        part of the path before date strings
    y
        year number
    mo
        month number
    d
        day number
    h
        hour number
    after_date_part
        part of the path after date strings
    Returns
    -------
        composed s3 path
    """
    if not bucket.startswith('s3://'):
        bucket = 's3://' + bucket
    s = '/'.join([bucket.strip('/'), pre_date_part.strip('/')])
    if y is not None and mo is not None:
        s += '/mo={y}-{mo}'.format(y=y, mo=mo)
    if d is not None:
        s += '/day={d}'.format(d=d)
    if h is not None:
        s += '/hour={h}'.format(h=h)
    if len(after_date_part) > 0:
        s += '/' + after_date_part
    return s
