def __init__(self, mxid, Api):
self.mxid = mxid<EOL>self.user_api = Api(identity=mxid)<EOL>self.api = Api()<EOL>self._rooms = {}<EOL>
Instantiates MatrixUser object.

        Args:
            mxid(str): User id (e.g. @me:example.createRoom)
            Api(func): Generates api for calls to the server.