# Path: src/holocron/_processors/_misc.py
# def resolve_json_references(value, context, keep_unknown=True):
#     def _do_resolve(node):
#     def __init__(self, *, fallback=None, jsonschema=None):
#     def __call__(self, fn):
#         def wrapper(app, *args, **kwargs):
#                     def is_encoding(value):
#                     def is_timezone(value):
#                     def is_path(value):
# class parameters:


import collections
import logging
from .._processors import _misc
        self.add_processor(name, processor)
        self._processor_wrappers.add(name)

    def add_pipe(self, name, pipe):
        if name in self._pipes:
            _logger.warning("pipe override: '%s'", name)
        self._pipes[name] = pipe

    def invoke(self, pipe, stream=None):
        # A given 'pipe' may be either a pipe name or an actual
        # pipe definition. That's why need this ugly type check because any
        # string value is considered as a name. Passing an actual pipe is
        # very handy in couple of use cases, such as running a sub pipe
        # from some processor.
        if isinstance(pipe, str):
            if pipe not in self._pipes:
                raise ValueError(f"no such pipe: '{pipe}'")
            pipe = self._pipes[pipe]

        # Since processors expect an input stream to be an iterator, we cast a
        # given stream explicitly to an iterator even though everything will
        # probably work even if it's not. We just want to respect and enforce
        # established contracts.
        stream = iter(stream or [])

        for processor in pipe:
            # Resolve every JSON reference we encounter in a processor's
            # parameters. Please note, we're doing this so late because we
            # want to take into account metadata and other changes produced
            # by previous processors in the pipe.

# Path: src/holocron/_processors/_misc.py
# def resolve_json_references(value, context, keep_unknown=True):
#     def _do_resolve(node):
#     def __init__(self, *, fallback=None, jsonschema=None):
#     def __call__(self, fn):
#         def wrapper(app, *args, **kwargs):
#                     def is_encoding(value):
#                     def is_timezone(value):
#                     def is_path(value):
# class parameters:


# Path: src/holocron/_core/application.py
import collections
import logging
from .._processors import _misc

        self.add_processor(name, processor)
        self._processor_wrappers.add(name)

    def add_pipe(self, name, pipe):
        if name in self._pipes:
            _logger.warning("pipe override: '%s'", name)
        self._pipes[name] = pipe

    def invoke(self, pipe, stream=None):
        # A given 'pipe' may be either a pipe name or an actual
        # pipe definition. That's why need this ugly type check because any
        # string value is considered as a name. Passing an actual pipe is
        # very handy in couple of use cases, such as running a sub pipe
        # from some processor.
        if isinstance(pipe, str):
            if pipe not in self._pipes:
                raise ValueError(f"no such pipe: '{pipe}'")
            pipe = self._pipes[pipe]

        # Since processors expect an input stream to be an iterator, we cast a
        # given stream explicitly to an iterator even though everything will
        # probably work even if it's not. We just want to respect and enforce
        # established contracts.
        stream = iter(stream or [])

        for processor in pipe:
            # Resolve every JSON reference we encounter in a processor's
            # parameters. Please note, we're doing this so late because we
            # want to take into account metadata and other changes produced
            # by previous processors in the pipe.

            processor = _misc.resolve_json_references(