<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def instance(cls):
 """ Singleton to return only one instance of BaseManager. :returns: instance of BaseManager """


        if not hasattr(cls, "_instance") or cls._instance is None:
            cls._instance = cls()
        return cls._instance