<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(config, services):
 """ Builds images and tags them appropriately. Where "appropriately" means with the output of: git describe --tags HEAD and 'latest' as well (so the "latest" image for each will always be the most recently built) """

    filtered_services = {name: service for name, service in services.iteritems() if 'build' in service}

    _call_output('docker-compose build {}'.format(' '.join(filtered_services.iterkeys())))

    version = _get_version()

    for service_name, service_dict in filtered_services.iteritems():
        # Tag with proper version, they're already tagged latest from build
        image = service_dict['image']
        _call('docker tag {image}:latest {image}:{version}'.format(
                image=image,
                version=version
            )
        )