def METHOD_NAME(self) -> URL:
    query = dict(self.query or {})
    if self.warehouse and 'warehouse' not in query:
        query['warehouse'] = self.warehouse
    if self.role and 'role' not in query:
        query['role'] = self.role
    return URL.create(self.drivername, self.username, self.password, self.host, self.port, self.database, query)