code: def duration_by_name(database: Database):
      return {grain.name: grain.duration for grain in database.grains()}
  
file_path: superset/superset/migrations/versions/2020-04-29_09-24_620241d1153f_update_time_grain_sqla.py
imports: import json
  from alembic import op
  from sqlalchemy import Column, ForeignKey, Integer, Text
  from sqlalchemy.ext.declarative import declarative_base
  from superset import db, db_engine_specs
  from superset.databases.utils import make_url_safe
label_desc: Use image node_id 1 for calling a global function with example usage: duration_by_name(database) and returns: unknown