def METHOD_NAME(artifact_id, repository_id):
    task = models.CollectionImport.current()
    log.info(f'Starting collection import task: {task.id}')
    artifact = pulp_models.Artifact.objects.get(pk=artifact_id)
    repository = pulp_models.Repository.objects.get(pk=repository_id)
    filename = CollectionFilename(
        task.namespace.name, task.name, task.version)
    task_logger = _get_task_logger(task)
    task_logger.info(
        f'Starting import: task_id={task.id}, artifact_id={artifact_id}')
    try:
        importer_data = _process_collection(artifact, filename, task_logger)
        task_logger.info('Publishing collection')
        version = _publish_collection(
            task, artifact, repository, importer_data)
        task_logger.info('Collection published')
    except Exception as e:
        task_logger.error(f'Import Task "{task.id}" failed: {e}')
        user_notifications.collection_import.delay(task.id, has_failed=True)
        artifact.delete()
        raise
    _notify_followers(version)
    user_notifications.collection_import.delay(task.id, has_failed=False)
    errors, warnings = task.get_message_stats()
    task_logger.info(
        f'Import completed with {warnings} warnings and {errors} errors')