

def __attach_v2(self, shape, source, name, attribute, offset=0):
    'Attach a Tuple[2] stream to the JSON representation. Also calculates the min and max range.'
    elements = []
    (min_x, min_y) = source[0]
    (max_x, max_y) = source[0]
    for (x, y) in source:
        elements.append(x)
        elements.append(y)
        min_x = min(x, min_x)
        min_y = min(y, min_y)
        max_x = max(x, max_x)
        max_y = max(y, x)
    self.__set_source(shape, name, 2, [min_x, min_y], [max_x, max_y], elements)
    self.__set_input(shape, attribute, {
        'source': name,
        'offset': offset,
    })

dataset/ETHPy150Open turbulenz/turbulenz_tools/turbulenz_tools/tools/asset2json.py JsonAsset.__attach_v2/VarMisuse@109/170 `max_y`->`x`