def _GetLiveInstStatus(ctx, instance, instance_state):
  hvparams = ctx.cluster.FillHV(instance, skip_globals=True)

  allow_userdown = \
      ctx.cluster.enabled_user_shutdown and \
      (instance.hypervisor != constants.HT_KVM or
       hvparams[constants.HV_KVM_USER_SHUTDOWN])

  if instance.uuid in ctx.wrongnode_inst:
    return constants.INSTST_WRONGNODE
  else:
    if hv_base.HvInstanceState.IsShutdown(instance_state):
      if instance.admin_state >= constants.ADMINST_UP and allow_userdown:
        return constants.INSTST_USERDOWN
      elif instance.admin_state == constants.ADMINST_UP:
        return constants.INSTST_ERRORDOWN
      else:
        return constants.INSTST_ADMINDOWN
    else:
      if instance.admin_state == constants.ADMINST_UP:
        return constants.INSTST_RUNNING
      else:
        return constants.INSTST_ERRORUP
dataset/ETHPy150Open ganeti/ganeti/lib/query.py/_GetLiveInstStatus/operator `==` -> `>=`