def valid_op_json(op_json):
    """Asserts object is in the form of `[command, {payload}]`."""
    assert isinstance(op_json, list), 'json must be a list'
    assert len(op_json) == 2, 'json must be a list with 2 elements'
    assert isinstance(op_json[0], str), 'json[0] must be a str (command)'
    assert isinstance(op_json[1], dict), 'json[1] must be dict (payload)'
    return op_json