'Get a single instance with the given instance_id.'

def get(self, context, instance_id, expected_attrs=None):

    if (not expected_attrs):
        expected_attrs = []
    expected_attrs.extend(['metadata', 'system_metadata', 'security_groups', 'info_cache'])
    try:
        if uuidutils.is_uuid_like(instance_id):
            LOG.debug('Fetching    instance    by    UUID', instance_uuid=instance_id)
            instance = self._get_instance(context, instance_id, expected_attrs)
        else:
            LOG.debug('Failed    to    fetch    instance    by    id    %s', instance_id)
            raise exception.InstanceNotFound(instance_id=instance_id)
    except exception.InvalidID:
        LOG.debug('Invalid    instance    id    %s', instance_id)
        raise exception.InstanceNotFound(instance_id=instance_id)
    return instance
