'Move a field from the context to the top level of the event.'

def move_from_context(self, field, event, default_value=''):

    context = event.get('context', {})
    if (field in context):
        event[field] = context[field]
        del context[field]
    else:
        event[field] = default_value
