code: def task_pause_info(task_id):
      
      client = get_client()
      res = client.task_pause_info(task_id)
  
      def _custom_text_format(res):
          explicit_pauses = [
              field
              for field in EXPLICIT_PAUSE_MSG_FIELDS
              # n.b. some keys are absent for completed tasks
              if res.get(field[1])
          ]
          effective_pause_rules = res["pause_rules"]
  
          if not explicit_pauses and not effective_pause_rules:
              safeprint("Task {} is not paused.".format(task_id))
              click.get_current_context().exit(0)
  
          if explicit_pauses:
              formatted_print(
                  res,
                  fields=explicit_pauses,
                  text_format=FORMAT_TEXT_RECORD,
                  text_preamble="This task has been explicitly paused.\n",
                  text_epilog="\n" if effective_pause_rules else None,
              )
  
          if effective_pause_rules:
              formatted_print(
                  effective_pause_rules,
                  fields=PAUSE_RULE_DISPLAY_FIELDS,
                  text_preamble=(
                      "The following pause rules are effective on this task:\n"
                  ),
              )
  
      formatted_print(res, text_format=_custom_text_format)
docs: Executor for `globus task pause-info`