

def transition(self, link, params=None, decoders=None, link_ancestors=None):
    if (link.action == 'get'):
        document = Document(title='new', content={
            'new': 123,
        })
    elif (link.action in ('put', 'post')):
        if (params is None):
            params = {
                
            }
        document = Document(title='new', content={
            'new': 123,
            'foo': params.get('foo'),
        })
    else:
        document = None
    return _handle_inplace_replacements(document, link, link_ancestors)

dataset/ETHPy150Open core-api/python-client/tests/test_transitions.py MockTransport.transition/original