Method to call Python functions from R