code: def validate(self) -> None:
      logging.info("check that collection does not exist")
  
      db = get_db(self.alias)
      collections = db.list_collection_names()  # type: ignore
      if self.collection_name in collections:
          raise ValueError(
              f"found collection with name {self.collection_name}"
          )
  
file_path: datasets-server/jobs/mongodb_migration/src/mongodb_migration/drop_migrations.py
imports: import logging
  from mongoengine.connection import get_db
  from mongodb_migration.migration import IrreversibleMigrationError, Migration
label_desc: Use image node_id 4 for calling the MigrationDropCollection obj's underlying member method code with example usage: obj.validate() without return types