code: def generate_fake_dataframe(
      col_defs=[("f_1", "Numeric"), ("f_2", "Datetime", "time_index")],
      n_rows=10,
      df_name="df",
  ):
      def randomize(values_):
          random.seed(10)
          values = values_.copy()
          random.shuffle(values)
          return values
  
      def gen_series(values):
          values = [values] * n_rows
          if isinstance(values, list):
              values = flatten_list(values)
  
          return randomize(values)[:n_rows]
  
      def get_tags(lt, tags=set()):
          inferred_tags = ww_type_system.str_to_logical_type(
              lt
          ).standard_tags
          assert isinstance(inferred_tags, set)
          return inferred_tags.union(tags) - {"index", "time_index"}
  
      other_kwargs = {}
  
      df = pd.DataFrame()
      lt_dict = {}
      tags_dict = {}
      for name, lt_name, *rest in col_defs:
          if lt_name in logical_type_mapping:
              values = logical_type_mapping[lt_name]
              if lt_name == logical_types.Ordinal.__name__:
                  lt = logical_types.Ordinal(order=values)
              else:
                  lt = lt_name
              values = gen_series(values)
          else:
              raise Exception(f"Unknown logical type {lt_name}")
  
          lt_dict[name] = lt
  
          if len(rest):
              tags = rest[0]
              if "index" in tags:
                  other_kwargs["index"] = name
                  values = range(n_rows)
              if "time_index" in tags:
                  other_kwargs["time_index"] = name
                  values = pd.date_range("2000-01-01", periods=n_rows)
              tags_dict[name] = get_tags(lt_name, tags)
          else:
              tags_dict[name] = get_tags(lt_name)
  
          s = pd.Series(values, name=name)
          df = pd.concat([df, s], axis=1)
  
      df.ww.init(
          name=df_name,
          logical_types=lt_dict,
          semantic_tags=tags_dict,
          **other_kwargs,
      )
  
      return df
  
imports: import random
  from datetime import datetime
  import pandas
  import woodwork.type_sys.type_system
  from woodwork import logical_types
label_desc: Use image node_id 2 for calling a global function with example usage: generate_fake_dataframe(col_defs, n_rows, df_name) and returns: df, values, randomize, unknown