<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def build_api_access_required(f):
 """Decorator ensures API key has access to the build ID in the request. Always calls the given function with the models.Build entity as the first positional argument. """

    @functools.wraps(f)
    def wrapped(*args, **kwargs):
        g.api_key, g.build = can_api_key_access_build('build_id')
        return f(*args, **kwargs)
    return wrapped