<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def scramble_date(self, value, format='%d %b %Y'):
 """Return random date """

        # faker method signature changed
        if value == '':
            # handle the empty string by defaulting to 'now' and 1 year ago
            end_date = 'now'
            start_date = '-1y'
        else:
            # specified end date, and one year prior
            end_date = datetime.datetime.strptime(value, format).date()
            start_date = end_date - datetime.timedelta(days=365)
        fake_date = fake.date_time_between(start_date=start_date,
                                           end_date=end_date).strftime(format).upper()
        return fake_date