def look_at_obj(self, objecttype):
    # Find the object with the given objecttype
    entity = self.find_object(objecttype)
    
    if entity is None:
        # Find receptacle types that can contain the object
        r_types = self.find_canbe_contained(objecttype)
        if r_types is None:
            # Explore the environment to find the object
            self.explore()
            return
        else:
            # Check each receptacle type to find the object
            for r_type in r_types:
                r_entitys = self.find_receptacles(r_type)
                if r_entitys is None:
                    continue
                for r_entity in r_entitys:
                    self.goto(r_entity.name)
                    if r_entity.openable and not r_entity.isopen:
                        self.open_receptacle(r_entity.name)
                    entity = self.find_object(objecttype)
                    if entity is not None:
                        break
                if entity is not None:
                    break
    
    # If the object is found, go to its receptacle and take it
    if entity is not None:
        if self.name2type(self.holding)!= self.name2type(objecttype):
            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, go to a desklamp and turn it on
    if self.name2type(self.holding) == self.name2type(objecttype):
        desklamp = self.find_receptacle('desklamp')
        if desklamp is None:
            # Explore the environment to find a desklamp
            self.explore()
            return
        else:
            self.goto(desklamp.name)
            self.turn_on(desklamp.name)