'Implement the command.
This works both as a look and a search command; there is a
random chance of eventually finding a light source.'

def func(self):

    caller = self.caller
    if (random.random() < 0.8):
        caller.msg(random.choice(DARK_MESSAGES))
    elif any((obj for obj in caller.contents if utils.inherits_from(obj, LightSource))):
        caller.msg(ALREADY_LIGHTSOURCE)
    else:
        create_object(LightSource, key='splinter', location=caller)
        caller.msg(FOUND_LIGHTSOURCE)
