old_contents: // Returns array with group states
  export default function expandGroup(groupState, entityMap) {
    return groupState.attributes.entity_id.map(
      entityId => entityMap.get(entityId));
  }
  
new_contents: // Returns Immutable list with group states.
  // Entities that can't be found will be skipped.
  import { toImmutable } from 'nuclear-js';
  
  export default function expandGroup(groupState, entityMap) {
    return toImmutable(groupState.attributes.entity_id.map(
      entityId => entityMap.get(entityId)).filter(ent => !!ent));
  }
  
subject: Expand group filters out not found states