<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def isAnalysisServiceHidden(self, uid):
 """Checks if the analysis service that match with the uid provided must be hidden in results. If no hidden assignment has been set for the analysis in this request, returns the visibility set to the analysis itself. Raise a TypeError if the uid is empty or None Raise a ValueError if there is no hidden assignment in this request or no analysis service found for this uid. """

        if not uid:
            raise TypeError('None type or empty uid')
        sets = self.getAnalysisServiceSettings(uid)
        if 'hidden' not in sets:
            uc = getToolByName(self, 'uid_catalog')
            serv = uc(UID=uid)
            if serv and len(serv) == 1:
                return serv[0].getObject().getRawHidden()
            else:
                raise ValueError('{} is not valid'.format(uid))
        return sets.get('hidden', False)