code: def tril_indices_from(arr, k=0):
      """
      Return the indices for the lower-triangle of arr.
  
      See `tril_indices` for full details.
  
      Parameters
      ----------
      arr : array_like
          The indices will be valid for square arrays whose dimensions are
          the same as arr.
      k : int, optional
          Diagonal offset (see `tril` for details).
  
      Examples
      --------
  
      Create a 4 by 4 array.
  
      >>> a = np.arange(16).reshape(4, 4)
      >>> a
      array([[ 0,  1,  2,  3],
             [ 4,  5,  6,  7],
             [ 8,  9, 10, 11],
             [12, 13, 14, 15]])
  
      Pass the array to get the indices of the lower triangular elements.
  
      >>> trili = np.tril_indices_from(a)
      >>> trili
      (array([0, 1, 1, 2, 2, 2, 3, 3, 3, 3]), array([0, 0, 1, 0, 1, 2, 0, 1, 2, 3]))
  
      >>> a[trili]
      array([ 0,  4,  5,  8,  9, 10, 12, 13, 14, 15])
  
      This is syntactic sugar for tril_indices().
  
      >>> np.tril_indices(a.shape[0])
      (array([0, 1, 1, 2, 2, 2, 3, 3, 3, 3]), array([0, 0, 1, 0, 1, 2, 0, 1, 2, 3]))
  
      Use the `k` parameter to return the indices for the lower triangular array
      up to the k-th diagonal.
  
      >>> trili1 = np.tril_indices_from(a, k=1)
      >>> a[trili1]
      array([ 0,  1,  4,  5,  6,  8,  9, 10, 11, 12, 13, 14, 15])
  
      See Also
      --------
      tril_indices, tril, triu_indices_from
  
      Notes
      -----
      .. versionadded:: 1.4.0
  
      """
      if arr.ndim != 2:
          raise ValueError("input array must be 2-d")
      return tril_indices(arr.shape[-2], k=k, m=arr.shape[-1])
  
imports: import functools
  import operator
  from numpy.core.numeric import asanyarray, arange, zeros, greater_equal, multiply, ones, asarray, where, int8, int16, int32, int64, intp, empty, promote_types, diagonal, nonzero, indices
  from numpy.core.overrides import set_array_function_like_doc, set_module
  from numpy.core import overrides
  from numpy.core import iinfo
  from numpy.lib.stride_tricks import broadcast_to
label_desc: Use image node_id 20 for calling a global function with example usage: tril_indices_from(arr, k) and returns: tril_indices