def definition_name(cls):
        """Helper method for creating definition name.

        Names will be generated to include the classes package name,
        scope (if the class is nested in another definition) and class
        name.

        By default, the package name for a definition is derived from
        its module name. However, this value can be overriden by
        placing a 'package' attribute in the module that contains the
        definition class. For example:

          package = 'some.alternate.package'

          class MyMessage(Message):
            ...

          >>> MyMessage.definition_name()
          some.alternate.package.MyMessage

        Returns:
          Dot-separated fully qualified name of definition.

        """
        outer_definition_name = cls.outer_definition_name()
        if outer_definition_name is None:
            return six.text_type(cls.__name__)
        return u'%s.%s' % (outer_definition_name, cls.__name__)