<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_service(name=None, **kwargs):
 """Return a service endpoint for interacting with a Google API."""

    if name is not None:
        for kw, value in iteritems(SERVICES[name]):
            kwargs.setdefault(kw, value)
    return apiclient.discovery.build(**kwargs)