code: def _cromwell_debug(metadata):
      
      def get_failed_calls(cur, key=None):
          if key is None: key = []
          out = []
          if isinstance(cur, dict) and "failures" in cur and "callRoot" in cur:
              out.append((key, cur))
          elif isinstance(cur, dict):
              for k, v in cur.items():
                  out.extend(get_failed_calls(v, key + [k]))
          elif isinstance(cur, (list, tuple)):
              for i, v in enumerate(cur):
                  out.extend(get_failed_calls(v, key + [i]))
          return out
      print("Failed bcbio Cromwell run")
      print("-------------------------")
      for fail_k, fail_call in get_failed_calls(metadata["calls"]):
          root_dir = os.path.join("cromwell_work", os.path.relpath(fail_call["callRoot"]))
          print("Failure in step: %s" % ".".join([str(x) for x in fail_k]))
          print("  bcbio log file     : %s" % os.path.join(root_dir, "execution", "log", "bcbio-nextgen-debug.log"))
          print("  bcbio commands file: %s" % os.path.join(root_dir, "execution", "log",
                                                           "bcbio-nextgen-commands.log"))
          print("  Cromwell directory : %s" % root_dir)
          print()
docs: Format Cromwell failures to make debugging easier.