def METHOD_NAME(op_name, attr_key, value=None, level=10):
    """Register an operator property of an operator by name.
    Parameters
    ----------
    op_name : str
        The name of operator
    attr_key : str
        The attribute name.
    value : object, optional
        The value to set
    level : int, optional
        The priority level
    Returns
    -------
    fregister : function
        Register function if value is not specified.
    """
    def _register(v):
        """internal register function"""
        _ffi_api.RegisterOpAttr(op_name, attr_key, v, level)
        return v
    return _register(value) if value is not None else _register