class_docstr: Tests PgBouncer exporter.
class_docstr_tok: ["Tests","PgBouncer","exporter","."]
code: def _get_connection(self, values: dict) -> str:
      docs = render_chart(
          values=values,
          show_only=["templates/secrets/pgbouncer-stats-secret.yaml"],
      )
      encoded_connection = jmespath.search("data.connection", docs[0])
      return base64.b64decode(encoded_connection).decode()
  
imports: from __future__ import annotations
  import base64
  import jmespath
  import pytest
  from tests.charts.helm_template_generator import render_chart
label_desc: Use image node_id 2 for calling the TestPgbouncerExporter obj's underlying member method code with example usage: obj._get_connection(values) and returns: base64