def pick_cool_then_place(self, objecttype, receptacletype):
    # Step 1: Check if the agent is already holding the object
    if self.name2type(self.holding) != self.name2type(objecttype):
        # Step 2: Find the object
        entity = self.find_object(objecttype)
        if entity is None:
            # Step 3: If the object is not found, explore the environment
            self.explore()
            entity = self.find_object(objecttype)
            if entity is None:
                # If the object is still not found, return
                return
        # Step 4: Go to the object's receptacle and take it
        self.goto(entity.in_on)
        r_entity = self.seen_entitys[entity.in_on]
        if r_entity.openable and not r_entity.isopen:
            self.open_receptacle(r_entity.name)
        self.take(entity.name, entity.in_on)
    else:
        # Step 5: Cool the object using a fridge
        fridge = self.find_receptacle('fridge')
        if fridge is None:
            # Step 6: If the fridge is not found, explore the environment
            self.explore()
            fridge = self.find_receptacle('fridge')
            if fridge is None:
                # If the fridge is still not found, return
                return
        # Step 7: Go to the fridge and cool the object
        self.goto(fridge.name)
        if fridge.openable and not fridge.isopen:
            self.open_receptacle(fridge.name)
        self.cool(self.holding, fridge.name)
        # Step 8: Close the fridge after cooling
        if fridge.openable and fridge.isopen:
            self.close_receptacle(fridge.name)
        
        # Step 9: Place the cooled object in the desired receptacle
        r_entity = self.find_receptacle(receptacletype)
        if r_entity is None:
            # Step 10: If the receptacle is not found, explore the environment
            self.explore()
            r_entity = self.find_receptacle(receptacletype)
            if r_entity is None:
                # If the receptacle is still not found, return
                return
        self.goto(r_entity.name)
        if r_entity.openable and not r_entity.isopen:
            self.open_receptacle(r_entity.name)
        self.put(self.holding, r_entity.name)
        return