get_name_str

        High-level api: Produce a string that represents the name of a node.

        Parameters
        ----------

        element : `Element`
            A node in model tree.

        Returns
        -------

        str
            A string that represents the name of a node.

def get_name_str(self, element):
        '''get_name_str

        High-level api: Produce a string that represents the name of a node.

        Parameters
        ----------

        element : `Element`
            A node in model tree.

        Returns
        -------

        str
            A string that represents the name of a node.
        '''

        name = self.remove_model_prefix(self.url_to_prefix(element.tag))
        flags = self.get_flags_str(element)
        type_info = element.get('type')
        if type_info is None:
            pass
        elif type_info == 'choice':
            if element.get('mandatory') == 'true':
                return flags + ' ({})'.format(name)
            else:
                return flags + ' ({})?'.format(name)
        elif type_info == 'case':
            return ':({})'.format(name)
        elif type_info == 'container':
            return flags + ' {}'.format(name)
        elif type_info == 'leaf' or \
             type_info == 'anyxml' or \
             type_info == 'anydata':
            if element.get('mandatory') == 'true':
                return flags + ' {}'.format(name)
            else:
                return flags + ' {}?'.format(name)
        elif type_info == 'list':
            if element.get('key') is not None:
                return flags + ' {}* [{}]'.format(name, element.get('key'))
            else:
                return flags + ' {}*'.format(name)
        elif type_info == 'leaf-list':
            return flags + ' {}*'.format(name)
        else:
            return flags + ' {}'.format(name)