code: def f1(x, d=0):
      """Derivatives of sin->cos->-sin->-cos."""
      if d % 4 == 0:
          return np.sin(x)
      if d % 4 == 1:
          return np.cos(x)
      if d % 4 == 2:
          return -np.sin(x)
      if d % 4 == 3:
          return -np.cos(x)
  
imports: import itertools
  import os
  import numpy
  from numpy.testing import assert_equal, assert_allclose, assert_, assert_almost_equal, assert_array_almost_equal
  from pytest import raises
  import pytest
  from scipy._lib._testutils import check_free_memory
  from scipy.interpolate import RectBivariateSpline
  from scipy.interpolate._fitpack_py import splrep, splev, bisplrep, bisplev, sproot, splprep, splint, spalde, splder, splantider, insert, dblint
  from scipy.interpolate.dfitpack import regrid_smth
  from scipy.interpolate._fitpack2 import dfitpack_int
label_desc: Use image node_id 3 for calling a global function with example usage: f1(x, d) and returns: np, np, unknown, unknown