'Utility function for looking up an instance by uuid.
:param context: request context for auth
:param req: HTTP request. The instance is cached in this request.
:param instance_uuid: UUID of the server instance to get
:param is_detail: True if you plan on showing the details of the
instance in the response, False otherwise.'

def _get_server(self, context, req, instance_uuid, is_detail=False):

    expected_attrs = ['flavor', 'numa_topology']
    if is_detail:
        if api_version_request.is_supported(req, '2.26'):
            expected_attrs.append('tags')
        expected_attrs = self._view_builder.get_show_expected_attrs(expected_attrs)
    instance = common.get_instance(self.compute_api, context, instance_uuid, expected_attrs=expected_attrs)
    req.cache_db_instance(instance)
    return instance
