docs: def _validate_json_for_global_workflow(json_spec, args):
      """
      Validates fields used for building a global workflow.
      Since building a global workflow is done after all the underlying workflows
      are built, which may be time-consuming, we validate as much as possible here.
      """
      # TODO: verify the billTo can build the workflow
      # TODO: if the global workflow build fails add an option to interactively change billto
      # TODO: (or other simple fields) instead of failing altogether
      # TODO: get a confirmation before building a workflow that may be costly
      if 'name' not in json_spec:
          raise WorkflowBuilderException(
              "dxworkflow.json contains no 'name' field, but it is required to build a global workflow")
      if not dxpy.executable_builder.GLOBAL_EXEC_NAME_RE.match(json_spec['name']):
          raise WorkflowBuilderException(
              "The name of your workflow must match /^[a-zA-Z0-9._-]+$/")
      if json_spec['name'] != json_spec['name'].lower():
          logger.warn('workflow name "{}" should be all lowercase'.format(json_spec['name']))
  
      if 'version' not in json_spec:
          raise WorkflowBuilderException(
              "dxworkflow.json contains no 'version' field, but it is required to build a global workflow")
      if not dxpy.executable_builder.GLOBAL_EXEC_VERSION_RE.match(json_spec['version']):
          logger.warn('"version" {} should be semver compliant (e.g. of the form X.Y.Z)'.format(json_spec['version']))
  
      if 'details' in json_spec:
          if not isinstance(json_spec['details'], dict):
              raise WorkflowBuilderException(
                  'The field "details" must be a dictionary')
  
      if 'regionalOptions' in json_spec:
          if not (isinstance(json_spec['regionalOptions'], dict)
                  and json_spec['regionalOptions']
                  and all([isinstance(i, dict) for i in json_spec['regionalOptions'].values()])):
              raise WorkflowBuilderException(
                  'The field "regionalOptions" must be a non-empty dictionary whose values are dictionaries')
  
      if args.bill_to:
          json_spec["billTo"] = args.bill_to