Return a variable in CYPRESS

I have a class in cypress in which I would like to have a method to decide in the written test later which variable to use (example GoingBefore (yes), then go for yes = cy.get (‘… “)

How can I spell this correctly?

class MyClass {

    GoingBefore(yes, no){
    this.yes=cy.get('.mx-radio').eq(1);
    this.no=cy.get('.mx-radio').eq(2);
    return this }
    }
export default MyClass

and after in test

import MyClass from "./PageObject/MyClass"

it("Test", function(){
        const Test = new MyClass();
        Test.GoingBefore(yes);
    })