refactor common code in make_instance
Fixing for pylint
Fix pylint; Refactor source and target objects to be constructed with a dictionary of attributes