code: def _create_index(df, index):
      if is_instance(df, dd, "DataFrame") or is_instance(
          df, ps, "DataFrame"
      ):
          df[index] = 1
          df[index] = df[index].cumsum() - 1
      else:
          df.insert(0, index, range(len(df)))
      return df
  
imports: import copy
  import logging
  import warnings
  from collections import defaultdict
  import numpy
  import pandas
  from woodwork import init_series
  from woodwork.logical_types import Datetime, LatLong
  from featuretools.entityset import deserialize, serialize
  from featuretools.entityset.relationship import Relationship, RelationshipPath
  from featuretools.feature_base.feature_base import _ES_REF
  from featuretools.utils.gen_utils import Library, import_or_none, is_instance
  from featuretools.utils.plot_utils import check_graphviz, get_graphviz_format, save_graph
  from featuretools.utils.wrangle import _check_timedelta
label_desc: Use image node_id 3 for calling a global function with example usage: _create_index(df, index) and returns: df