def METHOD_NAME(k8s_client: CoreV1Api) -> str:
    """
    Get the first k8s namespace in a given cluster (based on the client config)
    matching the cloud composer / airflow naming pattern.
    """
    all_namespaces = k8s_client.list_namespace(watch=False)
    ns_pattern = re.compile(r'^composer-(\d+)-(\d+)-(\d+)'
                            r'-airflow-(\d+)-(\d+)-(\d+)-([A-Za-z0-9]+)$')
    for ns in all_namespaces.items:
        if (re.match(ns_pattern, ns.metadata.name) and
                ns.status.phase == 'Active'):
            return ns.metadata.name
    raise ValueError('Composer namespace not found')