Generate a mongo query from the given URL query parameters, handles OR query via multiples

        :param list reserved_attributes: A list of attributes you want to exclude from this particular query
        :return: dict

def get_mongo_query_from_arguments(self, reserved_attributes=[]):
        """Generate a mongo query from the given URL query parameters, handles OR query via multiples

        :param list reserved_attributes: A list of attributes you want to exclude from this particular query
        :return: dict
        """

        query = {}
        for arg in self.request.arguments:
            if arg not in reserved_attributes:
                if len(self.request.arguments.get(arg)) > 1:
                    query["$or"] = []
                    for val in self.request.arguments.get(arg):
                        query["$or"].append({arg: self.get_arg_value_as_type(val)})
                else:
                    query[arg] = self.get_arg_value_as_type(self.request.arguments.get(arg)[0])

        return query