'Use cls.example_data to create an instance of the described class.
If cls.example_data is None, just create a simple instance of the
class.'

def create_instance_of_described_class(self):

    if (self.example_data and self.session):
        instance = self.described_class(self.example_data, self.session)
    elif (self.example_data and (not self.session)):
        instance = self.described_class(self.example_data)
    else:
        instance = self.described_class()
        instance.session = self.session
    return instance
