def __getattr__(self, name, *args, **kwargs):
        """
        :param name: name of the method called
        :param args: parameters to pass to OrientDB client
        :param kwargs:parameters to pass to OrientDB client
        :return: function that calls the name of the method passed in on the OrientDB client using
        the arguments passed in.
        """

        def wrapper(*args, **kw):
            if name == 'db_create':
                if len(args) != 3:
                    raise Exception('db_create takes 3 arguments')
                args = _db_create(args[0], args[1], args[2])
            if name == 'data_cluster_add':
                if len(args) != 2:
                    raise Exception('db_cluster_add takes 3 arguments')
                args = _data_cluster_add(args[0], args[1])
            if name == 'db_exists':
                if len(args) != 2:
                    raise Exception('db_exists takes 2 arguments')
                args = (args[0], convert_memory_location(args[1]))
            return getattr(self.orientdb_client, name)(*args, **kw)
        return wrapper
dataset/ETHPy150Open calthoff/flask-orientdb/flask_orientdb.py/OrientDB.__getattr__/original