code: def print_variable(obj, **kwargs):
      
      variable_print_length = kwargs.get("variable_print_length", 1000)
      s = str(obj)
      if len(s) < 300:
          return "Printing the object:\n" + str(obj)
      else:
          return "Printing the object:\n" + str(obj)[:variable_print_length] + ' ...'
docs: Print the variable out. Limit the string length to, by default, 300 characters.