def cloud_hosted(self, cloud_hosted: bool = True) -> Self:
        """Only match granules that are hosted in the cloud. This is valid for public
        collections.

        ???+ Tip
            Cloud hosted collections can be public or restricted.
            Restricted collections will not be matched using this parameter

        Parameters:
            cloud_hosted: If `True`, obtain only cloud-hosted collections.

        Returns:
            self

        Raises:
            TypeError: `cloud_hosted` is not of type `bool`.
        """
        if not isinstance(cloud_hosted, bool):
            raise TypeError("cloud_hosted must be of type bool")

        self.params["cloud_hosted"] = cloud_hosted
        if hasattr(self, "DAAC"):
            provider = find_provider(self.DAAC, cloud_hosted)
            self.params["provider"] = provider
        return self
Only match granules that are hosted in the cloud. This is valid for public
        collections.

        ???+ Tip
            Cloud hosted collections can be public or restricted.
            Restricted collections will not be matched using this parameter

        Parameters:
            cloud_hosted: If `True`, obtain only cloud-hosted collections.

        Returns:
            self

        Raises:
            TypeError: `cloud_hosted` is not of type `bool`.
        
earthaccess/search.py