def look_at_obj(self, objecttype):
    # Find the object with the given objecttype
    entity = self.find_object(objecttype)
    
    # If the agent is not holding the object, take it from its receptacle
    if entity is None or self.name2type(self.holding)!= self.name2type(objecttype):
        if entity is None:
            # Explore the environment to find the object
            self.explore()
            entity = self.find_object(objecttype)
        
        if entity is not None:
            # 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)
    
    # If the agent is now holding the object, proceed to examine it
    if self.name2type(self.holding) == self.name2type(objecttype):
        # Find a desklamp
        desklamp = self.find_receptacle('desklamp')
        
        # If no desklamp is found, explore the environment
        if desklamp is None:
            self.explore()
            desklamp = self.find_receptacle('desklamp')
        
        # Go to the desklamp
        if desklamp is not None:
            self.goto(desklamp.name)
        
        # Turn on the desklamp
        if desklamp is not None and desklamp.toggleable and not desklamp.iston:
            self.turn_on(desklamp.name)