design patterns – Python: Function pipeline with multiple return/input values, or use OOP? Best Practices?

I have a ‘processing’ function and a ‘serializing’ function. Currently the processor returns 4 different types of data structures to be serialized in different ways.

Looking for the best practise on what to do here.

def process(input):
   return a,b,c,d

def serialize(a,b,c,d):
   # Different serialization patterns for each of a-d.

a,b,c,d = process(input)

That feels janky.
Should I instead use a class where a,b,c,d are member variables?

class VeryImportantDataProcessor:
   def process(self,input):
      self.a = ...
      self.b = ...

   def serialize(self):

vipd = VeryImportantDataProcessor()

Keen to hear your thoughts on what is best here!

Note after processing and serializing, the code goes on to use variable d for further unrelated shenanigans. Not sure if that changes anything.