class_docstr: Initialize class object 
class_docstr_tok: ["Initialize","class","object"]
code: def teardown_method(self, method):
      log.info(("*" * 35) + " teardown " + ("*" * 35))
      log.info(
          "[teardown_method] Start teardown test case %s..."
          % method.__name__
      )
  
      try:
          """Drop collection before disconnect"""
          if not self.connection_wrap.has_connection(
              alias=DefaultConfig.DEFAULT_USING
          )[0]:
              self.connection_wrap.connect(
                  alias=DefaultConfig.DEFAULT_USING,
                  host=cf.param_info.param_host,
                  port=cf.param_info.param_port,
              )
  
          if self.collection_wrap.collection is not None:
              if self.collection_wrap.collection.name.startswith(
                  "alias"
              ):
                  log.info(
                      f"collection {self.collection_wrap.collection.name} is alias, skip drop operation"
                  )
              else:
                  self.collection_wrap.drop(
                      check_task=ct.CheckTasks.check_nothing
                  )
  
          collection_list = self.utility_wrap.list_collections()[0]
          for collection_object in self.collection_object_list:
              if (
                  collection_object.collection is not None
                  and collection_object.name in collection_list
              ):
                  collection_object.drop(
                      check_task=ct.CheckTasks.check_nothing
                  )
  
          """ Clean up the rgs before disconnect """
          rgs_list = self.utility_wrap.list_resource_groups()[0]
          for rg_name in self.resource_group_list:
              if rg_name is not None and rg_name in rgs_list:
                  rg = self.utility_wrap.describe_resource_group(
                      name=rg_name,
                      check_task=ct.CheckTasks.check_nothing,
                  )[0]
                  if isinstance(rg, ResourceGroupInfo):
                      if rg.num_available_node > 0:
                          self.utility_wrap.transfer_node(
                              source=rg_name,
                              target=ct.default_resource_group_name,
                              num_node=rg.num_available_node,
                          )
                      self.utility_wrap.drop_resource_group(
                          rg_name,
                          check_task=ct.CheckTasks.check_nothing,
                      )
  
      except Exception as e:
          log.debug(str(e))
  
      try:
          """Drop roles before disconnect"""
          if not self.connection_wrap.has_connection(
              alias=DefaultConfig.DEFAULT_USING
          )[0]:
              self.connection_wrap.connect(
                  alias=DefaultConfig.DEFAULT_USING,
                  host=cf.param_info.param_host,
                  port=cf.param_info.param_port,
                  user=ct.default_user,
                  password=ct.default_password,
              )
  
          role_list = self.utility_wrap.list_roles(False)[0]
          for role in role_list.groups:
              role_name = role.role_name
              if role_name not in ["admin", "public"]:
                  each_role = self.utility_wrap.init_role(
                      name=role_name
                  )[0]
                  each_role.drop()
  
      except Exception as e:
          log.debug(str(e))
  
      try:
          """Delete connection and reset configuration"""
          res = self.connection_wrap.list_connections()
          for i in res[0]:
              self.connection_wrap.remove_connection(i[0])
  
          # because the connection is in singleton mode, it needs to be restored to the original state after teardown
          self.connection_wrap.add_connection(
              default={
                  "host": DefaultConfig.DEFAULT_HOST,
                  "port": DefaultConfig.DEFAULT_PORT,
              }
          )
      except Exception as e:
          log.debug(str(e))
  
imports: from numpy.core.fromnumeric import _partition_dispatcher
  import pytest
  import sys
  from pymilvus import DefaultConfig
  from base.database_wrapper import ApiDatabaseWrapper
  from base.connections_wrapper import ApiConnectionsWrapper
  from base.collection_wrapper import ApiCollectionWrapper
  from base.partition_wrapper import ApiPartitionWrapper
  from base.index_wrapper import ApiIndexWrapper
  from base.utility_wrapper import ApiUtilityWrapper
  from base.schema_wrapper import ApiCollectionSchemaWrapper, ApiFieldSchemaWrapper
  from base.high_level_api_wrapper import HighLevelApiWrapper
  from utils.util_log import test_log
  from common import common_func
  from common import common_type
  from pymilvus import ResourceGroupInfo
label_desc: Use image node_id 4 for calling the Base obj's underlying member method code with example usage: obj.teardown_method(method) without return types