code: def value_from_fsnative(arg, escape):
      
  
      assert isinstance(arg, fsnative)
  
      if escape:
          bytes_ = fsn2bytes(arg)
          if PY2:
              bytes_ = bytes_.decode("string_escape")
          else:
              # With py3.7 this has started to warn for invalid escapes, but we
              # don't control the input so ignore it.
              with warnings.catch_warnings():
                  warnings.simplefilter("ignore")
                  bytes_ = codecs.escape_decode(bytes_)[0]
          arg = bytes2fsn(bytes_)
  
      text = fsn2text(arg, strict=True)
      return text
docs: Takes an item from argv and returns a text_type value without
      surrogate escapes or raises ValueError.