code: def isInstrumentAllowed(self, instrument):
          
          if isinstance(instrument, str):
              uid = instrument
          else:
              uid = instrument.UID()
  
          return uid in self.getAllowedInstrumentUIDs()
docs: Checks if the specified instrument can be set for this analysis,
          either if the instrument was assigned directly (by using "Allows
          instrument entry of results") or indirectly via Method ("Allows manual
          entry of results") in Analysis Service Edit view.
          Param instrument can be either an uid or an object
          :param instrument: string,Instrument
          :return: True if the assignment of the passed in instrument is allowed
          :rtype: bool