code: def qr(a: ArrayLike, mode="reduced"):
      a = _atleast_float_1(a)
      result = torch.linalg.qr(a, mode=mode)
      if mode == "r":
          # match NumPy
          result = result.R
      return result
  
imports: from __future__ import annotations
  import functools
  import math
  from typing import Sequence
  import torch
  from .None import _dtypes_impl, _util
  from ._normalizations import ArrayLike, KeepDims, normalizer
label_desc: Use image node_id 18 for calling a global function with example usage: qr(a, mode) and returns: result