code: def from_record(record):
      return Resource(
          record["resource_id"], record["resource"], record["rate"]
      )
  
imports: import asyncio
  from gear import Database
label_desc: Use image node_id 1 for calling the Resource obj's underlying member method code with example usage: obj.from_record(record) and returns: Resource