def _get_asset_id_with_enclosure(self, enclosure_id):
mgr = self._get_provider_manager('<STR_LIT>')<EOL>query_session = mgr.get_asset_query_session_for_repository(self._catalog_id, proxy=self._proxy)<EOL>query_form = query_session.get_asset_query()<EOL>query_form.match_enclosed_object_id(enclosure_id)<EOL>query_result = query_session.get_assets_by_query(query_form)<EOL>if query_result.available() > <NUM_LIT:0>:<EOL><INDENT>asset_id = query_result.next().get_id()<EOL><DEDENT>else:<EOL><INDENT>create_form = self.get_asset_form_for_create([ENCLOSURE_RECORD_TYPE])<EOL>create_form.set_enclosed_object(enclosure_id)<EOL>asset_id = self.create_asset(create_form).get_id()<EOL><DEDENT>return asset_id<EOL>
Create an Asset with an enclosed foreign object.

        This is here to support AssetCompositionSession.set_asset. May need
        to add this in other objects to support other osid.Containable objects.
        return: (osid.id.Id) - the id of the new Asset