def METHOD_NAME(op, return_name=True):
    """ get the weight of operators with weight."""
    for inp in op.all_inputs():
        if inp._var.persistable == True:
            if return_name:
                return inp.name()
            else:
                return inp
    return None