def _get_variable_name_or_register(var, variables, names, params, prefix):
    '''
    Args:
        var (~nnabla.Variable)
        variables (OrderedDict)
        names (dict): Force name table, Variable -> str
        params (dict): NdArray -> str
        prefix(str)
    '''
    if var not in variables.values():
        vname = prefix
        if var.data in params:
            vname = params[var.data]
        elif var in names:
            vname = names[var]
        vname = _get_unique_variable_name(vname, variables)
        variables[vname] = var
    else:
        vname = list(variables.keys())[list(variables.values()).index(var)]

    return vname
def _get_variable_name_or_register ( var , variables , names , params , prefix ) : if var not in variables . values ( ) : vname = prefix if var . data in params : vname = params [ var . data ] elif var in names : vname = names [ var ] vname = _get_unique_variable_name ( vname , variables ) variables [ vname ] = var else : vname = list ( variables . keys ( ) ) [ list ( variables . values ( ) ) . index ( var ) ] return vname
Args:
        var (~nnabla.Variable)
        variables (OrderedDict)
        names (dict): Force name table, Variable -> str
        params (dict): NdArray -> str
        prefix(str)