def look_at_obj(self, objecttype):
    # Find an object with the given objecttype
    entity = self.find_object(objecttype)
    if entity is None:
        # Explore the environment to find the object
        self.explore()
        return
    else:
        # Go to a desklamp and turn it on
        desklamps = self.find_objects('desklamp')
        if desklamps is None:
            # Explore the environment to find a desklamp
            self.explore()
            return
        else:
            for desklamp in desklamps:
                self.goto(desklamp.in_on)
                self.turn_on(desklamp.name)
                # Now you can examine the object under the light of the desklamp
                return