def makeleaf(expr):
 name = (expr._name or '_')
 if (expr in _leaf_cache):
  return _leaf_cache[expr]
 if isinstance(expr, Symbol):
  _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

def makeleaf ( expr ) : name = ( expr . _name or '_' ) if ( expr in _leaf_cache ) : return _leaf_cache [ expr ] if isinstance ( expr , Symbol ) : _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 .