hunk.code_window:             # Horizon hit and we have a soft horizon (no hard env reset).
               if hit_horizon and soft_horizon:
                   episode.soft_reset()
                   resetted_obs: Dict[AgentID, EnvObsType] = all_agents_obs
               else:
                   del active_episodes[env_id]
  
hunk.labels: keep keep keep replace keep keep
hunk.after_edit:                 resetted_obs: Dict[EnvID, Dict[AgentID, EnvObsType]] = \
                       {env_id: all_agents_obs}
  
hunk.file_path: rllib/evaluation/sampler.py
hunk.type: replace
file: package io.ray.serve.poll;
  
  import java.io.Serializable;
  import java.util.Objects;
  import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
  
  /** Key type of long poll. */
  public class KeyType implements Serializable {
  
    private static final long serialVersionUID = -8838552786234630401L;
  
    private final LongPollNamespace longPollNamespace;
  
    private final String key;
  
    private int hash;
  
    public KeyType(LongPollNamespace longPollNamespace, String key) {
      this.longPollNamespace = longPollNamespace;
      this.key = key;
    }
  
    public LongPollNamespace getLongPollNamespace() {
      return longPollNamespace;
    }
  
    public String getKey() {
      return key;
    }
  
    @Override
    public int hashCode() {
      if (hash == 0) {
        hash = Objects.hash(longPollNamespace, key);
      }
      return hash;
    }
  
    @Override
    public boolean equals(Object obj) {
      if (this == obj) {
        return true;
      }
      if (obj == null || getClass() != obj.getClass()) {
        return false;
      }
      KeyType keyType = (KeyType) obj;
      return Objects.equals(longPollNamespace, keyType.getLongPollNamespace())
          && Objects.equals(key, keyType.getKey());
    }
  
    @Override
    public String toString() {
      return ReflectionToStringBuilder.toString(this);
    }
  }
  