code: public function withAttributes($attributes): self
      {
          $copy = clone $this;
          $copy->attributes = collect($attributes)->all();
          $copy->normalize();
  
          return $copy;
      }
docs: Return a new instance with the provided attributes.
  
  @param array|Collection $attributes
  @return ResourceObject