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