code: def add_resource(self, resource: Resource):
      if (
          self.latest_resource is None
          or self.latest_resource.rate != resource.rate
      ):
          self.resource_id_updates[
              resource.resource_id
          ] = resource.resource_id
          self.latest_resource = resource
      else:
          self.resource_id_updates[
              resource.resource_id
          ] = self.latest_resource.resource_id
  
imports: import asyncio
  from gear import Database
label_desc: Use image node_id 2 for calling the Product obj's underlying member method code with example usage: obj.add_resource(resource) without return types