'Retrieves the context for a hunt.'

def Handle(self, args, token=None):

    hunt = aff4.FACTORY.Open(args.hunt_id.ToURN(), aff4_type=implementation.GRRHunt, token=token)
    if isinstance(hunt.context, rdf_hunts.HuntContext):
        state = api_call_handler_utils.ApiDataObject()
        result = ApiGetHuntContextResult(context=hunt.context, state=state)
        result.args = hunt.args
        return result
    else:
        context = api_call_handler_utils.ApiDataObject().InitFromDataObject(hunt.context)
        return ApiGetHuntContextResult(state=context)
