def METHOD_NAME(op, tsr):
    data_size = 0
    for idx in op['inputs']:
        if tsr[idx]['shape'].size > 0:
            data_size += reduce(lambda x, y: x * y,
                                tsr[idx]['shape']) * tsr[idx]['shape'].dtype.itemsize
    for idx in op['outputs']:
        if tsr[idx]['shape'].size > 0:
            data_size += reduce(lambda x, y: x * y,
                                tsr[idx]['shape']) * tsr[idx]['shape'].dtype.itemsize
    return data_size