Python code: metadata changes