code: def _range(e):
      global val
      e["range"] = val
      val += 1
  
      current_date = datetime.strptime(e["dates"], "%Y-%m-%dT%H:%M:%SZ")
      first_date = datetime.fromtimestamp(1)
      week = abs(current_date - first_date).days // 7
      e["week"] = week
  
      return e
  
file_path: gradio/demo/dashboard/helpers.py
imports: import collections
  from datetime import datetime
  from datasets import DatasetDict, load_dataset
  import numpy
label_desc: Use image node_id 1 for calling a global function with example usage: _range(e) and returns: e