def drop_current_version(self, name: str) -> None:
        """Drop a specific version from an External Agent."""

        versions_df = self.list_agent_versions(name)

        if not versions_df.empty:
            found_last = False
            for _, row in versions_df.iterrows():
                if "LAST" in row["aliases"]:
                    found_last = True
                    current_version = row["name"]
                    if "DEFAULT" in row["aliases"]:
                        raise ValueError(
                            f"""Cannot drop the default version for {name}.
                            To delete the version, application needs to be deleted. Note that deleting the application will delete all the versions and runs associated with the app"""
                        )

                    resolved_name = name.upper()
                    query = f"""ALTER EXTERNAL AGENT if exists "{resolved_name}" DROP VERSION "{current_version}";"""

                    execute_query(self.session, query)
                    logger.info(
                        f"Dropped current version {current_version} from External Agent {name}."
                    )
                    break

            if not found_last:
                raise ValueError(
                    f"No version with 'LAST' alias found for External Agent {name}."
                )
        else:
            raise ValueError(f"No versions found for External Agent {name}.")
Drop a specific version from an External Agent.
src/connectors/snowflake/trulens/connectors/snowflake/dao/external_agent.py