docs: def generate(args=None, namespace=None, file=None):
      """
      Genereate DDL from data sources named.
  
      :args:      String or list of strings to be parsed for arguments
      :namespace: Namespace to extract arguments from
      :file:      Write to this open file object (default stdout)
      """
      if hasattr(args, 'split'):
          args = args.split()
      args = parser.parse_args(args, namespace)
      set_logging(args)
      logging.info(str(args))
      if args.dialect in ('pg', 'pgsql', 'postgres'):
          args.dialect = 'postgresql'
      if args.dialect.startswith('dj'):
          args.dialect = 'django'
      elif args.dialect.startswith('sqla'):
          args.dialect = 'sqlalchemy'
  
      if args.dialect not in dialect_names:
          raise NotImplementedError('First arg must be one of: %s' % ", ".join(dialect_names))
      if args.dialect == 'sqlalchemy':
          print(sqla_head, file=file)
      for datafile in args.datafile:
          if is_sqlalchemy_url.search(datafile):
              table_names_for_insert = []
              for tbl in sqlalchemy_table_sources(datafile):
                  t = generate_one(tbl, args, table_name=tbl.generator.name, file=file)
                  if t.data:
                      table_names_for_insert.append(tbl.generator.name)
              if args.inserts and args.dialect == 'sqlalchemy':
                  print(sqla_inserter_call(table_names_for_insert), file=file)
              if t and args.inserts:
                  for seq_update in emit_db_sequence_updates(t.source.db_engine):
                      if args.dialect == 'sqlalchemy':
                          print('    conn.execute("%s")' % seq_update, file=file)
                      elif args.dialect == 'postgresql':
                          print(seq_update, file=file)
          else:
              generate_one(datafile, args, file=file)