def check_params(module):
 if ((module.params.get('name') is None) and (module.params.get('id') is None)):
  module.fail_json(msg='"name" or "id" is required')

def check_params ( module ) : if ( ( module . params . get ( 'name' ) is None ) and ( module . params . get ( 'id' ) is None ) ) : module . fail_json ( msg = '"name" or "id" is required' )
most modules must have either name or id specified .