def get_item_from_container(self, source_kw, target_kw):
        c_item = self.pc.location.get_item_by_kw(source_kw) or \
                    self.pc.check_inv_for_keyword(source_kw)
        if not c_item:
            return 'There\'s no "%s" containers here.' % source_kw
        if not c_item.has_type('container'):
            return 'That\'s not a container.'
        container = c_item.item_types.get('container')
        if container.closed:
            return '%s is closed.' % c_item.name.capitalize()
        item = container.get_item_by_kw(target_kw)
        if not item:
            return '%s doesn\'t exist.' % target_kw.capitalize()
        if item.carryable or (self.pc.permissions & GOD):
            container.item_remove(item)
            self.pc.item_add(item)
            if self.pc.location:
                room_tell = '%s gets %s from %s.' % (self.pc.fancy_name(),
                                                       item.name, c_item.name)
                self.pc.location.tell_room(room_tell, [self.pc.name])
            return 'You get %s.' % item.name
        else:
            return 'You can\'t take that.'
dataset/ETHPy150Open shinymud/ShinyMUD/src/shinymud/commands/commands.py/Get.get_item_from_container/original