code: def redacted_connection_uri(
      conn: Connection, filtered_params=None, filtered_prefixes=None
  ):
      """
      Return the connection URI for the given Connection.
  
      This method additionally filters URI by removing query parameters that are known to carry sensitive data
      like username, password, access key.
      """
      if filtered_prefixes is None:
          filtered_prefixes = []
      if filtered_params is None:
          filtered_params = []
  
      def filter_key_params(k: str):
          return k not in filtered_params and any(
              substr in k for substr in filtered_prefixes
          )
  
      conn_uri = conn.get_uri()
      parsed = urlparse(conn_uri)
  
      # Remove username and password
      netloc = f"{parsed.hostname}" + (
          f":{parsed.port}" if parsed.port else ""
      )
      parsed = parsed._replace(netloc=netloc)
      if parsed.query:
          query_dict = dict(parse_qsl(parsed.query))
          if conn.EXTRA_KEY in query_dict:
              query_dict = json.loads(query_dict[conn.EXTRA_KEY])
          filtered_qs = {
              k: v
              for k, v in query_dict.items()
              if not filter_key_params(k)
          }
          parsed = parsed._replace(query=urlencode(filtered_qs))
      return urlunparse(parsed)
  
imports: from __future__ import annotations
  import datetime
  import json
  import logging
  import os
  from contextlib import suppress
  from functools import wraps
  from typing import TYPE_CHECKING, Any, Iterable
  from urllib.parse import parse_qsl, urlencode, urlparse, urlunparse
  import attrs
  from attrs import asdict
  from openlineage.client.utils import RedactMixin
  from airflow.compat.functools import cache
  from airflow.configuration import conf
  from airflow.providers.openlineage.plugins.facets import AirflowMappedTaskRunFacet, AirflowRunFacet
  from airflow.utils.context import AirflowContextDeprecationWarning
  from airflow.utils.log.secrets_masker import Redactable, Redacted, SecretsMasker, should_hide_value_for_key
label_desc: Use image node_id 5 for calling a global function with example usage: redacted_connection_uri(conn, filtered_params, filtered_prefixes) and returns: urlunparse, unknown