def task_catalog_get(task, task_id, is_consumer):
    """
    Get an object from the task catalog
    @param task: The Celery Task
    @param task_id:  The Celery Task ID
    @param is_consumer: Boolean
    @return: scope
    """
    catalog = getattr(task, '_instana_scopes', None)
    if catalog is None:
        return None

    key = (task_id, is_consumer)
    return catalog.get(key, None)