Generic query method.
        In reality, your storage class would have its own query methods,
        Performs a Mongo find on the Marketdata index metadata collection.
        See:
        http://api.mongodb.org/python/current/api/pymongo/collection.html

def query(self, *args, **kwargs):
        """
        Generic query method.
        In reality, your storage class would have its own query methods,
        Performs a Mongo find on the Marketdata index metadata collection.
        See:
        http://api.mongodb.org/python/current/api/pymongo/collection.html
        """
        qitem = th.merge_dicts(*args)
        # If there a 'price' type, check to see if there's a 'period' as well. 
        # This determines which kind of data we need to get.
        query_type = qitem.get('type')
        _query_type = kwargs.get("_type")
        if query_type is None and _query_type is None:
            raise AttributeError("Must specify a type. It is a selector to help the user sort through data. Can use either kwargs or dict")

        if query_type is None:
            # This means _query_type is specified instead
            query_type = _query_type

        if query_type == "price":
            try:
                th.price_query_filter(qitem)
            except KeyError:
                raise AttributeError("When querying price information, couldn't find the required variables. Must have: exchange (to select what exchange the data is coming from) and period (to select the time period of the data)")
        
        pagination = kwargs.get("pagination", False)
        page_size = kwargs.get("page_size", 1)
        page_num = kwargs.get("page_num", 10)
        # Gets the page if pagination == true
        if pagination:
            # Re return something else here
            skips = page_size * (page_num - 1)
            cursor = self._collection.find(qitem).skip(skips).limit(page_size)
            for x in cursor:
                del x["_id"]
                yield x
        
        # Break the function here
        else:
            # Get absolute latest
            for x in self._collection.find(qitem):
                del x['_id'] # Remove default unique '_id' field from doc
                # TODO: Create generic cast
                yield x