code: def fftfreq(n, d=1.0, dtype=None, name=None):
      if d * n == 0:
          raise ValueError("d or n should not be 0.")
  
      if dtype is None:
          dtype = ivy.default_dtype()
      val = 1.0 / (n * d)
      pos_max = (n + 1) // 2
      neg_max = n // 2
      indices = ivy.arange(-neg_max, pos_max, dtype=dtype)
      indices = ivy.roll(indices, -neg_max)
      return ivy.multiply(indices, val)
  
file_path: ivy/ivy/functional/frontends/paddle/fft.py
imports: import ivy
  from ivy.func_wrapper import with_supported_dtypes
  from ivy.functional.frontends.paddle.func_wrapper import to_ivy_arrays_and_back
label_desc: Use image node_id 3 for calling a global function with example usage: fftfreq(n, d, dtype, name) and returns: ivy