docs: def _map_vm_status(self, openstack_status, timed_shutdown_at=None):
          '''
           Map openstack vm statuses to vmshepherd vm statuses
           openstack vm statuses: ACTIVE, BUILD, DELETED, ERROR, HARD_REBOOT, MIGRATING, PASSWORD, PAUSED, REBOOT,
           REBUILD, RESCUE, RESIZE, REVERT_RESIZE, SHELVED, SHELVED_OFFLOADED, SHUTOFF, SOFT_DELETED, SUSPENDED, UNKNOWN,
           VERIFY_RESIZE
  
           :arg string openstack_status
           :returns string
          '''
          statuses = {
              VmState.TERMINATED: [
                  'ERROR',
                  'DELETED',
                  'SHUTOFF',
                  'SOFT_DELETED',
                  'SUSPENDED'
              ],
              VmState.PENDING: [
                  'BUILD',
                  'REBUILD'
              ],
              VmState.RUNNING: ['ACTIVE']
          }
  
          state = VmState.UNKNOWN
          for vmstate, value in statuses.items():
              if openstack_status in value:
                  state = vmstate
                  break
          if timed_shutdown_at:
              now = time.time()
              if timed_shutdown_at < now:
                  state = VmState.AFTER_TIME_SHUTDOWN
              elif (timed_shutdown_at - now) < self.config.get('shutdown_grace_period', 900):
                  state = VmState.NEARBY_SHUTDOWN
  
          return state