def build_hash_with_entities(entities_name, entity_name, proc, entities)
      Hash[*entities_name.collect { |name| proc.call(name) == entity_name ? [name, entities] : [name, []] }.flatten(1)]
    end
def build_hash_with_entities(entities_name, entity_name, proc, entities)
      Hash[*entities_name.collect { |name| proc.call(name) == entity_name ? [name, entities] : [name, []] }.flatten(1)]
    end
output: {entities_name[0] => [], entities_name[1] => entities}
 with proc.call(entities_name[1] == entity_name)