code: def state_data():
      df = pd.read_csv(
          os.path.join(
              os.path.dirname(__file__), "data/state-codes.csv"
          )
      )
      df.loc[:, "val"] = df.index.values
      df.loc[:, "cat"] = np.random.uniform(1, 20, len(df))
      return df
  
imports: import getpass
  import os
  import random
  import string
  import unittest
  import numpy
  import pandas
  import pytest
  from pandas.tseries.offsets import Day
  from past.utils import old_div
  from six import PY3
label_desc: Use image node_id 16 for calling a global function with example usage: state_data() and returns: df