def METHOD_NAME(self, goal_handle):
    response = LookupTransform.Result()
    response.transform = TransformStamped()
    response.error = TF2Error()
    try:
        if not goal_handle.request.advanced:
            transform = self.buffer_core.lookup_transform_core(target_frame=goal_handle.request.target_frame,
                                                               source_frame=goal_handle.request.source_frame,
                                                               time=Time.from_msg(goal_handle.request.source_time))
        else:
            transform = self.buffer_core.lookup_transform_full_core(
                target_frame=goal_handle.request.target_frame,
                target_time=Time.from_msg(goal_handle.request.target_time),
                source_frame=goal_handle.request.source_frame,
                source_time=Time.from_msg(goal_handle.request.source_time),
                fixed_frame=goal_handle.request.fixed_frame
            )
        response.transform = transform
        goal_handle.succeed()
    except LookupException as e:
        response.error.error = TF2Error.LOOKUP_ERROR
        goal_handle.abort()
    return response