code: def _set_sampling_priority(self, value):
          
  
          # Ignore debug spans trying to re-enable debug.
          if self.is_debug() and value:
              return False
  
          try:
              value_num = int(value)
          except ValueError:
              return False
          if value_num == 0:
              self.context.flags &= ~(SAMPLED_FLAG | DEBUG_FLAG)
              return False
          if self.tracer.is_debug_allowed(self.operation_name):
              self.context.flags |= SAMPLED_FLAG | DEBUG_FLAG
              return True
          return False
docs: N.B. Caller must be holding update_lock.