def merge_schema(first, second):
    if not (type(first) == type(second) == dict):
        raise ValueError("Argument is not a schema")

    if not (first.get('type') == second.get('type') == 'object'):
        raise NotImplementedError("Unsupported root type")

    return merge_objects(first, second)
The Stream state machine only allows StreamState inputs.
dataset/ETHPy150Open scrapinghub/skinfer/skinfer/json_schema_merger.py/merge_schema--crossover with--dataset/ETHPy150Open python-hyper/hyper-h2/test/test_state_machines.py/TestStreamStateMachine.test_state_machine_only_allows_stream_states