def _get_boundary_date_string(date_sr, boundary, date_format='%Y-%m-%d'):
    """
    Returns the first or last date of the series date_sr based on the 
    value passed in boundary. 
    
    date_sr: Series consisting of date
    boundary: Allowed values are 'first' or 'last'
    date_format: Format to be used for converting date into String
    """
    return date_sr.describe().loc[boundary].strftime(format='%Y-%m-%d')