code: def endpoint_is_activated(endpoint_id, until, absolute_time):
      
      client = get_client()
      res = client.endpoint_get_activation_requirements(endpoint_id)
  
      def fail(deadline=None):
          exp_string = ""
          if deadline is not None:
              exp_string = " or will expire within {} seconds".format(deadline)
  
          message = "The endpoint is not activated{}.\n\n".format(
              exp_string
          ) + activation_requirements_help_text(res, endpoint_id)
          formatted_print(res, simple_text=message)
          click.get_current_context().exit(1)
  
      def success(msg, *format_params):
          formatted_print(res, simple_text=(msg.format(endpoint_id, *format_params)))
          click.get_current_context().exit(0)
  
      # eternally active endpoints have a special expires_in value
      if res["expires_in"] == -1:
          success("{} does not require activation")
  
      # autoactivation is not supported and --until was not passed
      if until is None:
          # and we are active right now (0s in the future)...
          if res.active_until(0):
              success("{} is activated")
          # or we are not active
          fail()
  
      # autoactivation is not supported and --until was passed
      if res.active_until(until, relative_time=not absolute_time):
          success("{} will be active for at least {} seconds", until)
      else:
          fail(deadline=until)
docs: Executor for `globus endpoint is-activated`