code: def pinv(input, *, atol=None, rtol=None, hermitian=False, out=None):
      # TODO: add handling for hermitian
      if atol is None:
          return ivy.pinv(input, rtol=rtol, out=out)
      else:
          sigma = ivy.svdvals(input)[0]
          if rtol is None:
              rtol = atol / sigma
          else:
              if atol > rtol * sigma:
                  rtol = atol / sigma
  
      return ivy.pinv(input, rtol=rtol, out=out)
  
imports: import math
  import ivy
  import ivy.functional.frontends.torch
  from ivy.functional.frontends.torch.func_wrapper import to_ivy_arrays_and_back
  from ivy.func_wrapper import with_supported_dtypes, with_unsupported_dtypes
  from collections import namedtuple
label_desc: Use image node_id 22 for calling a global function with example usage: pinv(input) and returns: ivy, ivy