def makeleaf(expr):
    name = expr._name or '_'
    if expr in _leaf_cache:
        return _leaf_cache[expr]
    if isinstance(expr, Symbol):  # Idempotent on symbols
        _used_tokens[name].add(expr._token)
        _leaf_cache[expr] = expr
        return expr
    used_for_name = _used_tokens[name]
    for token in itertools.count():
        if token not in used_for_name:
            break
    result = symbol(name, expr.dshape, token)
    used_for_name.add(token)
    _leaf_cache[expr] = result
    return result
Name of a new leaf replacement for this expression
dataset/ETHPy150Open blaze/blaze/blaze/compute/core.py/makeleaf