code: def get_user_experiments():
      tic = time.time()
      myuser_id = get_and_verify_user(request, get_auth_config())
      if request.json and "user" in request.json.keys():
          user = request.json["user"]
      else:
          user = myuser_id
  
      # TODO check is myuser_id is authorized to do that
  
      getlogger().info("Getting experiments of user {}".format(user))
  
      experiments = [
          e for e in get_db().get_user_experiments(user, blocking=True)
      ]
      status = "ok"
      retval = json.dumps(
          {"status": status, "experiments": experiments}
      )
      toc = time.time()
      getlogger().info(
          "Processed get_user_experiments request in {} s".format(
              toc - tic
          )
      )
      return retval
  
imports: import time
  import sys
  from flask import Flask, render_template, request, redirect, abort
  from studio import model
  import argparse
  import yaml
  import json
  import socket
  import subprocess
  import traceback
  import six
  import os
  import requests
  from requests.exceptions import ChunkedEncodingError
  from .experiment import experiment_from_dict
  from .auth import get_and_verify_user, get_auth
  from .util import parse_verbosity
  from studio.util import logs
label_desc: Use image node_id 12 for calling a global function with example usage: get_user_experiments() and returns: retval