code: def _push_to_hub_with_retries(
      ds: datasets.Dataset, retries: int = 3, **kwargs
  ):
      try:
          return ds.push_to_hub(**kwargs)
      except Exception as ex:
          print(
              f"Found error pushing dataset with params {kwargs}. Error: {ex}"
          )
          if retries == 0:
              print("No more retries will be done. Exiting...")
          else:
              print(f" Retring {retries} more times")
          return _push_to_hub_with_retries(
              ds, retries=retries - 1, **kwargs
          )
  
imports: import copy
  import os
  import sys
  from time import sleep
  import datasets
  import pandas
  import pytest
  import spacy
  from argilla.client.datasets import DatasetBase, DatasetForText2Text, DatasetForTextClassification, DatasetForTokenClassification, WrongRecordTypeError, read_datasets, read_pandas
  from argilla.client.models import Text2TextRecord, TextClassificationRecord, TokenClassificationRecord
  from argilla.datasets import TextClassificationSettings
label_desc: Use image node_id 1 for calling a global function with example usage: _push_to_hub_with_retries(ds, retries) and returns: ds, _push_to_hub_with_retries