code: def ref_trilu(x, k=0, upper=True):
      if upper:
          return np.triu(x, k)
      else:
          return np.tril(x, k)
  
imports: import pytest
  import numpy
  import nnabla.functions
  from nbla_test_utils import list_context
label_desc: Use image node_id 1 for calling a global function with example usage: ref_trilu(x, k, upper) and returns: np, np