def find(*ids, parent: nil)
      expects_array = ids.first.is_a?(Array)
      ids = ids.flatten.compact.uniq.map(&:to_i)

      case ids.size
      when 0
        raise EntityError, "Couldn't find #{name} without an ID"
      when 1
        entity = find_entity(ids.first, parent)
        model_entity = from_entity(entity)
        expects_array ? [model_entity].compact : model_entity
      else
        lookup_results = find_all_entities(ids, parent)
        from_entities(lookup_results.all)
      end
    end
def find(*ids, parent: nil)
      expects_array = ids.first.is_a?(Array)
      ids = ids.flatten.compact.uniq.map(&:to_i)

      case ids.size
      when 0
        raise EntityError, "Couldn't find #{name} without an ID"
      when 1
        entity = find_entity(ids.first, parent)
        model_entity = from_entity(entity)
        expects_array ? [model_entity].compact : model_entity
      else
        lookup_results = find_all_entities(ids, parent)
        from_entities(lookup_results.all)
      end
    end
Find entity by id - this can either be a specific id (1), a list of ids (1, 5, 6),
 or an array of ids ([5, 6, 10]). The parent key is optional.

 @param [Integer] ids One or more ids to retrieve.
 @param [Google::Cloud::Datastore::Key] parent The parent key of the entity.

 @return [Model, nil] An ActiveModel object or nil for a single id.
 @return [Array<Model>] An array of ActiveModel objects for more than one id.