how to adjust rigidbody settings for lots of objects

I got a scene width lots of small objects (around 2000 icospheres). I need to be able adjust rigid body settings for all those 2000 icospheres Any idea on how to do that (perhaps by the use of python, but how ?)

import bpy

• The object_settings_copy that does the work is already easily available in the toolshelf. You can find it in the Physics tab "Copy From Active" button. – sambler Apr 20 '18 at 18:04