<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def random(self, namespace=0):
 """ Returns query string for random page """

        query = self.LIST.substitute(
            WIKI=self.uri,
            ENDPOINT=self.endpoint,
            LIST='random')
        query += "&rnlimit=1&rnnamespace=%d" % namespace

        emoji = [
            u'\U0001f32f',  # burrito or wrap
            u'\U0001f355',  # slice of pizza
            u'\U0001f35c',  # steaming bowl of ramen
            u'\U0001f363',  # sushi
            u'\U0001f369',  # doughnut
            u'\U0001f36a',  # cookie
            u'\U0001f36d',  # lollipop
            u'\U0001f370',  # strawberry shortcake
        ]

        action = 'random'
        if namespace:
            action = 'random:%d' % namespace

        self.set_status(action, random.choice(emoji))

        return query