Get a record from the database with the id field matching `obj_id`.

def get_collection(self, collection, **kwargs):
        """Get a record from the database with the id field matching `obj_id`.
        """
        query = kwargs.get('query', {})
        projection = kwargs.get('projection', {})
        projection = None if len(projection) < 1 else projection
        limit = kwargs.get('limit', 0)  # no limit by default
        # sort = kwargs.get('sort', {})
        logging.info("About to get a collection from the database")
        logging.debug("Collection: {}".format(collection))
        logging.debug("Query: {}".format(query))
        logging.debug("Projection: {}".format(projection))
        logging.debug("Limit: {}".format(limit))
        records = \
            list(self.db[collection].find(query, projection).limit(limit))
        logging.debug("Got {} results".format(len(records)))
        return records