def get_client(
        self, token: Optional[str] = None, org_name: Optional[str] = None, **influxdb_client_kwargs
    ) -> tuple[InfluxDBClient, Organization]:
        """
        Returns an instance of the influxdb client with the associated test organization created
        when the container is spawn; for InfluxDB 2.x versions.
        - https://github.com/influxdata/influxdb-client-python
        - https://pypi.org/project/influxdb-client/

        This InfluxDB client requires to specify the organization when using most of the API's endpoints,
        as an Organisation instance rather than its name or id (deprecated). As a convenience, this
        client getter can also retrieve and return the organization instance along with the client.
        Otherwise, None is returned in place of the organization instance.

        This organization is created when spawning the container in setup mode (which is likely what you
        want) by giving its name to the 'org_name' parameter constructor.
        """

        influxclient = InfluxDBClient(self.get_url(), token=token, **influxdb_client_kwargs)

        if org_name is None:
            return influxclient, None

        orgs = influxclient.organizations_api().find_organizations(org=org_name)
        if len(orgs) == 0:
            raise ValueError(f"Could not retrieved the Organization corresponding to name '{org_name}'")

        return influxclient, orgs[0]

        Returns an instance of the influxdb client with the associated test organization created
        when the container is spawn; for InfluxDB 2.x versions.
        - https://github.com/influxdata/influxdb-client-python
        - https://pypi.org/project/influxdb-client/

        This InfluxDB client requires to specify the organization when using most of the API's endpoints,
        as an Organisation instance rather than its name or id (deprecated). As a convenience, this
        client getter can also retrieve and return the organization instance along with the client.
        Otherwise, None is returned in place of the organization instance.

        This organization is created when spawning the container in setup mode (which is likely what you
        want) by giving its name to the 'org_name' parameter constructor.
        
modules/influxdb/testcontainers/influxdb2/__init__.py