code: def make_frames(index=None, nulls="none"):
      df = pd.DataFrame(
          {
              "x": range(10),
              "y": list(map(float, range(10))),
              "z": list("abcde") * 2,
          }
      )
      df.z = df.z.astype("category")
      df2 = pd.DataFrame(
          {
              "x": range(10, 20),
              "y": list(map(float, range(10, 20))),
              "z": list("edcba") * 2,
          }
      )
      df2.z = df2.z.astype("category")
      if nulls == "all":
          df.y = np.full_like(df.y, np.nan)
          df2.y = np.full_like(df2.y, np.nan)
      if nulls == "some":
          mask = np.arange(10)
          np.random.shuffle(mask)
          mask = mask[:5]
          df.loc[mask, "y"] = np.nan
          df2.loc[mask, "y"] = np.nan
      gdf = gd.DataFrame.from_pandas(df)
      gdf2 = gd.DataFrame.from_pandas(df2)
      if index:
          df = df.set_index(index)
          df2 = df2.set_index(index)
          gdf = gdf.set_index(index)
          gdf2 = gdf2.set_index(index)
      return df, df2, gdf, gdf2
  
imports: from decimal import Decimal
  import numpy
  import pandas
  import pytest
  import cudf
  from cudf.api.types import is_categorical_dtype
  from cudf.core._compat import PANDAS_GE_150, PANDAS_LT_140
  from cudf.core.dtypes import Decimal32Dtype, Decimal64Dtype, Decimal128Dtype
  from cudf.testing._utils import assert_eq, assert_exceptions_equal
label_desc: Use image node_id 1 for calling a global function with example usage: make_frames(index, nulls) and returns: df,  df2,  gdf,  gdf2