Desperate for answer: Very long function to run

Sorry new to Ray. If I have a very long function to run, what choices do I get:

  1. Put everything in the @ray.remote function. (which is sub-optimal)?

  2. Put in Actor?

Would you do it in 2nd method? Is there a 3rd way? Many thanks for answer in advanced.