code: def validate_status(status):
      """
      Verify if given status is valid. Can be one of ``new``, ``reserved``, ``suspended``,
      ``completed``, ``interrupted``, or ``broken``.
      """
      if status is not None and status not in Trial.allowed_stati:
          raise ValueError(
              f"Given status `{status}` not one of: {Trial.allowed_stati}"
          )
  
imports: from __future__ import annotations
  import copy
  import hashlib
  import logging
  import os
  import warnings
  from datetime import timedelta
  from orion.core.utils.exceptions import InvalidResult
  from orion.core.utils.flatten import unflatten
label_desc: Use image node_id 1 for calling a global function with example usage: validate_status(status) without return types