function getPath(elem, autoMode) {
    if (!elem) {
        return null;
    }

    try {
        let path = false;
        let line = elem;
        line = line.trim();

        if (autoMode && !elem.includes(statics.SWAGGER_TAG + '.path')) {
            const quotMark = line[0];
            if ((quotMark == '"' || quotMark == "'" || quotMark == '`') && line.split(quotMark).length > 2) {
                path = utils.popString(line);
                path = path.split('/').map(p => {
                    if (p.includes(':')) p = '{' + p.replace(':', '') + '}';
                    return p;
                });
                path = path.join('/');
            } else {
                path = '/_undefined_path_0x' + elem.length.toString(16);
            }
        } else if (elem.includes(statics.SWAGGER_TAG + '.path')) {
            // Search for #swagger.path
            path = elem.split(new RegExp(statics.SWAGGER_TAG + '.path\\s*\\='))[1];
            path = utils.popString(path);
        } else {
            path = '/_undefined_path_0x' + elem.length.toString(16);
        }
        return path;
    } catch (err) {
        return '/_undefined_path_0x' + elem.length.toString(16);
    }
}
TODO: fill
@param {*} elem
@param {*} autoMode