code: def get_trilu_mask(shape, k, upper):
      mask_data = np.ones(shape)
      if upper:
          mask_data = np.triu(mask_data, k)
      else:
          mask_data = np.tril(mask_data, k)
      return nn.Variable.from_numpy_array(mask_data)
  
imports: import nnabla
  import numpy
  import nnabla.functions
  from .utils import no_grad
label_desc: Use image node_id 1 for calling a global function with example usage: get_trilu_mask(shape, k, upper) and returns: nn