def _assign_enterprise_role_to_users(self, _get_batch_method, options, is_feature_role=False):
role_name = options['<STR_LIT>']<EOL>batch_limit = options['<STR_LIT>']<EOL>batch_sleep = options['<STR_LIT>']<EOL>batch_offset = options['<STR_LIT>']<EOL>current_batch_index = batch_offset<EOL>users_batch = _get_batch_method(<EOL>batch_offset,<EOL>batch_offset + batch_limit<EOL>)<EOL>role_class = SystemWideEnterpriseRole<EOL>role_assignment_class = SystemWideEnterpriseUserRoleAssignment<EOL>if is_feature_role:<EOL><INDENT>role_class = EnterpriseFeatureRole<EOL>role_assignment_class = EnterpriseFeatureUserRoleAssignment<EOL><DEDENT>enterprise_role = role_class.objects.get(name=role_name)<EOL>while users_batch.count() > <NUM_LIT:0>:<EOL><INDENT>for index, user in enumerate(users_batch):<EOL><INDENT>LOGGER.info(<EOL>'<STR_LIT>',<EOL>current_batch_index + index, user.id<EOL>)<EOL>role_assignment_class.objects.get_or_create(<EOL>user=user,<EOL>role=enterprise_role<EOL>)<EOL><DEDENT>sleep(batch_sleep)<EOL>current_batch_index += len(users_batch)<EOL>users_batch = _get_batch_method(<EOL>current_batch_index,<EOL>current_batch_index + batch_limit<EOL>)<EOL><DEDENT>
Assigns enterprise role to users.