code: def fix_tag(value):
      
      if sys.version_info[0] == 2:
          return bytes(value)
      else:
          if type(value) == bytes:
              return value
          elif type(value) == str:
              return value.encode('ASCII')
          return str(value).encode('ASCII')
docs: Make a FIX tag value from string, bytes, or integer.