def METHOD_NAME(self, key, field, desc=""):
    mandatory = ''
    default = ''
    out = []
    reference = ''
    name = key.get('@name')
    if field and name != field:
        return []
    if isinstance(key, dict):
        if key.get('description', {}).get('text') is not None:
            desc += "\n".join(textwrap.wrap(re.sub(r"\s+", " ",
                              key['description']['text']), width=50))
        if key.get('mandatory') is not None:
            mandatory = key.get('mandatory').get('@value')
        if key.get('default') is not None:
            default = key.get('default').get('@value')
        if key.get('type') is not None:
            if key['type'].get('@name') == 'leafref':
                reference = self.get_referenced_table_field(
                                      key['type']['path'].get('@value'))
            elif key['type'].get('@name') == 'union':
                for types in key['type']['type']:
                    if 'path' in types:
                        val = self.get_referenced_table_field(
                                      types['path'].get('@value'))
                        if not reference:
                            reference = val
                        else:
                            reference += "\n" + val
        out.append([name, desc, mandatory, default, reference])
    return out