parameters: (self)
docstring: generate role for role maker
docstring_summary: generate role for role maker
docstring_tokens: generate role for role maker
function: def _generate_role(self):
          """
          generate role for role maker
          """
          if not self._role_is_generated:
              if not self._is_collective:
                  self._ps_env()
              else:
                  self._collective_env()
              self._role_is_generated = True
              if not paddle.fluid.framework.in_dygraph_mode():
                  self._gloo_init()
function_tokens: def _generate_role ( self ) : if not self . _role_is_generated : if not self . _is_collective : self . _ps_env ( ) else : self . _collective_env ( ) self . _role_is_generated = True if not paddle . fluid . framework . in_dygraph_mode ( ) : self . _gloo_init ( )