def __init__(self, auth: Optional[Auth] = None, *args: Any, **kwargs: Any) -> None:
        """Builds an instance of DataCollections to query the CMR.

        Parameters:
            auth: An authenticated `Auth` instance. This is an optional parameter
                for queries that need authentication, e.g. restricted datasets.
        """
        super().__init__(*args, **kwargs)

        self.session = (
            # To search, we need the new bearer tokens from NASA Earthdata
            auth.get_session(bearer_token=True)
            if auth and auth.authenticated
            else requests.session()
        )

        if auth:
            self.mode(auth.system.cmr_base_url)

        self._debug = False

        self.params["has_granules"] = True
        self.params["include_granule_counts"] = True
Builds an instance of DataCollections to query the CMR.

        Parameters:
            auth: An authenticated `Auth` instance. This is an optional parameter
                for queries that need authentication, e.g. restricted datasets.
        
earthaccess/search.py