code: def apply_with(self, _, v, ctx):
          
          if isinstance(v, six.binary_type):
              self.v = v
          elif isinstance(v, six.string_types):
              self.v = v.encode('utf-8')
          else:
              raise ValueError('Unsupported type for Byte: ' + str(type(v)))
docs: constructor
  
          :param str v: accept six.string_types, six.binary_type