<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def store( self, type, nick, time, fmt=None, code=None, filename=None, mime=None, data=None, makeshort=True):
 """ Store code or a file. Returns a tuple containing the uid and shortid """

        uid = str(uuid.uuid4())
        shortid = short_key() if makeshort else None

        paste = assign_params(self.build_paste, locals())()
        self._store(uid, paste, data)
        if nick:
            self._storeLog(nick, time, uid)
        return uid, shortid