class_docstr: List and create new clusters
  
  GET /clusters : list current clusters
  POST / clusters (JSON body) : create a new cluster
class_docstr_tok: ["List","and","create","new","clusters","GET","\/clusters",":","list","current","clusters","POST","\/","clusters","(","JSON","body",")",":","create","a","new","cluster"]
code: def get(self):
      # currently reloads everything from disk. Is that what we want?
      clusters = self.cluster_manager.load_clusters(
          init_default_clusters=True
      )
  
      def sort_key(model):
          """Sort clusters
  
          order:
          - running
          - default profile
          - default cluster id
          """
          running = True if model.get("controller") else False
          profile = model["cluster"]["profile"]
          cluster_id = model["cluster"]["cluster_id"]
          default_profile = profile == "default"
          default_cluster = cluster_id == ""
  
          return (
              not running,
              not default_profile,
              not default_cluster,
              profile,
              cluster_id,
          )
  
      self.write(
          json.dumps(
              sorted(
                  (
                      self.cluster_model(key, cluster)
                      for key, cluster in clusters.items()
                  ),
                  key=sort_key,
              )
          )
      )
  
file_path: ipyparallel/ipyparallel/nbextension/handlers.py
imports: import json
  import os
  from tornado import web
  from ..cluster import ClusterManager
  from ..util import abbreviate_profile_dir
  from .base import get_api_handler
label_desc: Use image node_id 1 for calling the ClusterListHandler obj's underlying member method code with example usage: obj.get() and returns: unknown,  unknown,  unknown,  profile,  cluster_id