def look_at_obj(self, objecttype):
    # Check if the agent is already holding the object
    if self.name2type(self.holding) != self.name2type(objecttype):
        # Find the object with the given objecttype
        entity = self.find_object(objecttype)
        if entity is None:
            # If the object is not found, explore the environment to find it
            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)
    else:
        # If the agent is already holding the object, proceed to find a desklamp
        pass

    # Now, find a desklamp to turn on
    desklamp = self.find_receptacle('desklamp')
    if desklamp is None:
        # If no desklamp is found, explore the environment
        self.explore()
        return
    else:
        # Go to the desklamp and turn it on
        self.goto(desklamp.name)
        if not desklamp.ison:
            self.turn_on(desklamp.name)
        
        # Now that the desklamp is on, the agent can examine the object
        # Assuming that examining the object is just a placeholder action
        # since the environment doesn't provide a specific "examine" action.
        print(f"Examining {self.holding} under the light of {desklamp.name}.")