def METHOD_NAME(url: str, connection: OracleConnection) -> str:
    """
    Depending on the oracle connection type, we need to handle the URL differently
    """
    if isinstance(connection.oracleConnectionType, OracleTNSConnection):
        # ref https://stackoverflow.com/questions/14140902/using-oracle-service-names-with-sqlalchemy
        url += connection.oracleConnectionType.oracleTNSConnection
        return url
    # If not TNS, we add the hostPort
    url += connection.hostPort
    if isinstance(connection.oracleConnectionType, OracleDatabaseSchema):
        url += (
            f"/{connection.oracleConnectionType.databaseSchema}"
            if connection.oracleConnectionType.databaseSchema
            else ""
        )
        return url
    if isinstance(connection.oracleConnectionType, OracleServiceName):
        url = f"{url}/?service_name={connection.oracleConnectionType.oracleServiceName}"
        return url
    raise ValueError(f"Unknown connection type {connection.oracleConnectionType}")