def METHOD_NAME(self, target):
    results = ImportResults(import_method=self, status="pending")
    results.investigation = Investigation(created_by=current_user.username)
    if isinstance(target, AttachedFile):
        results.investigation.import_document = target
        target = target.filepath
    else:
        results.investigation.import_url = target
    results.investigation.save()
    results.save()
    celery_app.send_task(
        "core.investigation.import_task", [str(results.id), target]
    )
    return results