def owner_valid?(obj, valid, invalid)
      otypes = obj.class.owners
      invalid.all? { |other| not otypes.include?(other.class) } or
        valid.any? { |other| otypes.include?(other.class) }
    end
def owner_valid?(obj, valid, invalid)
      otypes = obj.class.owners
      invalid.all? { |other| not otypes.include?(other.class) } or
        valid.any? { |other| otypes.include?(other.class) }
    end
Returns whether the given domain object satisfies at least one of the following conditions:
 * it does not have an owner among the invalid objects
 * it has an owner among the valid objects

 @param [Resource] obj the domain object to check
 @param [<Resource>] valid the valid migrated objects
 @param [<Resource>] invalid the invalid migrated objects
 @return [Boolean] whether the owner is valid