def METHOD_NAME(project_name, project_path):
    if os.path.isfile('codelite_template.workspace'):
        tree = etree.parse('codelite_template.workspace')
    else:
        tree = etree.parse(os.path.join(os.path.dirname(__file__), 'codelite_template.workspace'))
    root = tree.getroot()
    root.attrib['Name'] = project_name
    node = root.find('Project')
    node.attrib['Name'] = project_name
    node.attrib['Path'] = project_name + '.project'
    node = root.find('BuildMatrix').find('WorkspaceConfiguration').find('Project')
    node.attrib['Name'] = project_name
    out = open(project_name + '.workspace', 'w')
    out.write('<?xml version="1.0" encoding="UTF-8"?>\n')
    xml_indent(root)
    out.write(etree.tostring(root, encoding='utf-8'))
    out.close()