code: def stage_redis(self, variable, data):
          
          if isinstance(data, int):
              data = str(data)
          # handle binary
          if variable.endswith('Binary'):
              try:
                  data = base64.b64decode(data)
              except binascii.Error:
                  msg = 'The Binary staging data for variable {} is not properly base64 encoded.'
                  msg = msg.format(variable)
                  sys.exit(msg)
          elif variable.endswith('BinaryArray'):
              if isinstance(data, string_types):
                  data = json.loads(data)
  
              try:
                  # loop through each entry
                  decoded_data = []
                  for d in data:
                      d_decoded = base64.b64decode(d)
                      decoded_data.append(d_decoded)
                  data = decoded_data
              except binascii.Error:
                  msg = 'The BinaryArray staging data for variable {} is not properly base64 encoded.'
                  msg = msg.format(variable)
                  sys.exit(msg)
          self.log.info(u'[stage] Creating variable {}'.format(variable))
          self.tcex.playbook.create(variable, data)
docs: Stage data in Redis.
  
          Args:
              variable (str): The Redis variable name.
              data (dict|list|str): The data to store in Redis.