code: def free_resource_id(self, rid):
          
  
          self.resource_id_lock.acquire()
          try:
              i = rid & self.info.resource_id_mask
  
              # Attempting to free a resource id outside our range
              if rid - i != self.info.resource_id_base:
                  return None
  
              try:
                  del self.resource_ids[i]
              except KeyError:
                  pass
          finally:
              self.resource_id_lock.release()
docs: d.free_resource_id(rid)
  
          Free resource id RID.  Attempts to free a resource id which
          isn't allocated by us are ignored.