def _set_asset(self,<EOL>asset_data=None,<EOL>asset_type=None,<EOL>asset_content_type=None,<EOL>asset_content_record_types=None,<EOL>display_name='<STR_LIT>',<EOL>description='<STR_LIT>'):
<EOL>rm = self.my_osid_object_form._get_provider_manager('<STR_LIT>')<EOL>catalog_id = '<STR_LIT>'<EOL>try:<EOL><INDENT>catalog_id = self.my_osid_object_form._catalog_id<EOL><DEDENT>except AttributeError:<EOL><INDENT>if '<STR_LIT>' in self.my_osid_object_form._my_map:<EOL><INDENT>catalog_id = Id(self.my_osid_object_form._my_map['<STR_LIT>'][<NUM_LIT:0>])<EOL><DEDENT>elif '<STR_LIT>' in self.my_osid_object_form._my_map:<EOL><INDENT>catalog_id = Id(self.my_osid_object_form._my_map['<STR_LIT>'][<NUM_LIT:0>])<EOL><DEDENT><DEDENT>try:<EOL><INDENT>aas = rm.get_asset_admin_session_for_repository(<EOL>catalog_id,<EOL>self.my_osid_object_form._proxy)<EOL><DEDENT>except (TypeError, NullArgument):  <EOL><INDENT>aas = rm.get_asset_admin_session_for_repository(<EOL>catalog_id)<EOL><DEDENT>afc = aas.get_asset_form_for_create([])<EOL>if asset_type is not None:<EOL><INDENT>afc.set_genus_type(asset_type)<EOL><DEDENT>afc.set_display_name(display_name)<EOL>afc.set_description(description)<EOL>asset_id = aas.create_asset(afc).get_id()<EOL>ac = None<EOL>if asset_data is not None:<EOL><INDENT>asset_content_type_list = asset_content_record_types<EOL>if asset_content_type_list is None:<EOL><INDENT>asset_content_type_list = []<EOL><DEDENT>try:<EOL><INDENT>config = self.my_osid_object_form._runtime.get_configuration()<EOL>parameter_id = Id('<STR_LIT>')<EOL>asset_content_type_list.append(<EOL>config.get_value_by_parameter(parameter_id).get_type_value())<EOL><DEDENT>except (AttributeError, KeyError, NotFound):<EOL><INDENT>pass<EOL><DEDENT>acfc = aas.get_asset_content_form_for_create(asset_id,<EOL>asset_content_type_list)<EOL>if asset_content_type is not None:<EOL><INDENT>acfc.set_genus_type(asset_content_type)<EOL><DEDENT>acfc.set_data(asset_data)<EOL>ac = aas.create_asset_content(acfc)<EOL><DEDENT>if ac is not None:<EOL><INDENT>return asset_id, ac.ident<EOL><DEDENT>else:<EOL><INDENT>return asset_id, None<EOL><DEDENT>
stub