code: def delete_role(self, name):
          # type: (str) -> None
          
          client = self._client('iam')
          inline_policies = client.list_role_policies(
              RoleName=name
          )['PolicyNames']
          for policy_name in inline_policies:
              self.delete_role_policy(name, policy_name)
          client.delete_role(RoleName=name)
docs: Delete a role by first deleting all inline policies.