[ADD] Copy function for python code