code: def parse_roles(self, fetched_role, params):
          
          role = {}
          role['instances_count'] = 'N/A'
          # When resuming upon throttling error, skip if already fetched
          if fetched_role['RoleName'] in self.roles:
              return
          api_client = params['api_client']
          # Ensure consistent attribute names across resource types
          role['id'] = fetched_role.pop('RoleId')
          role['name'] = fetched_role.pop('RoleName')
          role['arn'] = fetched_role.pop('Arn')
          # Get other attributes
          get_keys(fetched_role, role, [ 'CreateDate', 'Path'])
          # Get role policies
          policies = self.__get_inline_policies(api_client, 'role', role['id'], role['name'])
          if len(policies):
              role['inline_policies'] = policies
          role['inline_policies_count'] = len(policies)
          # Get instance profiles
          profiles = handle_truncated_response(api_client.list_instance_profiles_for_role, {'RoleName': role['name']}, ['InstanceProfiles'])
          manage_dictionary(role, 'instance_profiles', {})
          for profile in profiles['InstanceProfiles']:
              manage_dictionary(role['instance_profiles'], profile['InstanceProfileId'], {})
              role['instance_profiles'][profile['InstanceProfileId']]['arn'] = profile['Arn']
              role['instance_profiles'][profile['InstanceProfileId']]['name'] = profile['InstanceProfileName']
          # Get trust relationship
          role['assume_role_policy'] = {}
          role['assume_role_policy']['PolicyDocument'] = fetched_role.pop('AssumeRolePolicyDocument')
          # Save role
          self.roles[role['id']] = role
docs: Parse a single IAM role and fetch additional data