def instrument(self, instrument: str) -> Self:
        """Search datasets by instrument.

        ???+ Tip
            Not all datasets have an associated instrument. This works
            only at the dataset level but not the granule (data) level.

        Parameters:
            instrument (String): instrument of a datasets, e.g. instrument=GEDI

        Returns:
            self

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

        self.params["instrument"] = instrument
        return self
Search datasets by instrument.

        ???+ Tip
            Not all datasets have an associated instrument. This works
            only at the dataset level but not the granule (data) level.

        Parameters:
            instrument (String): instrument of a datasets, e.g. instrument=GEDI

        Returns:
            self

        Raises:
            TypeError: `instrument` is not of type `str`.
        
earthaccess/search.py