def pick_cool_then_place(self, objecttype, receptacletype):
    # Step 1: Pick the object
    if self.name2type(self.holding) != self.name2type(objecttype):
        # Find the object
        entity = self.find_object(objecttype)
        if entity is None:
            # Explore the environment to find the object
            self.explore()
            return
        else:
            # 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)
            return
    else:
        # Step 2: Cool the object in a fridge
        fridge = self.find_receptacle('fridge')
        if fridge is None:
            # Explore the environment to find a fridge
            self.explore()
            return
        else:
            self.goto(fridge.name)
            if fridge.openable and not fridge.isopen:
                self.open_receptacle(fridge.name)
            self.cool(self.holding, fridge.name)
            if fridge.openable and fridge.isopen:
                self.close_receptacle(fridge.name)
        
        # Step 3: Place the cooled object in the specified receptacle
        r_entity = self.find_receptacle(receptacletype)
        if r_entity is None:
            # Explore the environment to find the receptacle
            self.explore()
            return
        else:
            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