How to call function on AssetDatabase.importPackageCompleted

I’m new to programming with Unity and I’m trying to use the AssetDatabase.importPackageCompleted event to call a calllback function. I can’t wrap my head around whats wrong here.

 public static void ImportAsset()
 {
     string assetPath = "Path\\To\\Some\\file.unitypackage";
     AssetDatabase.ImportPackage(assetPath, false);
     AssetDatabase.importPackageCompleted += new AssetDatabase.ImportPackageCallback(ImportCallback);
}

static void ImportCallback(string packageName) 
{
    Debug.Log ("This is working" + packageName);
}

For future reference, if anyone runs into the same problem:

public static void ImportAsset()
  {
          AssetDatabase.importPackageCompleted += ImportCallback;
          string assetPath = "Path\\To\\Some\\file.unitypackage";
          AssetDatabase.ImportPackage(assetPath, false);
     }
     
     static void ImportCallback(string packageName) 
     {
         Debug.Log ("This is working" + packageName);
         AssetDatabase.importPackageCompleted -= ImportCallback;
     }`