code: def stanc(file=None, charset='utf-8', model_code=None, model_name="anon_model",
            include_paths=None, verbose=False, obfuscate_model_name=True):
      if file and model_code:
          raise ValueError("Specify stan model with `file` or `model_code`, "
                           "not both.")
      if file is None and model_code is None:
          raise ValueError("Model file missing and empty model_code.")
      if file is not None:
          if isinstance(file, string_types):
              try:
                  with io.open(file, 'rt', encoding=charset) as f:
                      model_code = f.read()
              except:
                  logger.critical("Unable to read file specified by `file`.")
                  raise
          else:
              model_code = file.read()
      model_code_bytes = model_code.encode('utf-8')
      if include_paths is None:
          include_paths = [os.path.abspath('.')]
      elif isinstance(include_paths, string_types):
          include_paths = [include_paths]
      include_paths = [os.path.join(path, "") for path in include_paths]
      include_paths_bytes = [path.encode('utf-8') for path in include_paths]
      allow_undefined = False
      if obfuscate_model_name:
          model_name = (
              model_name + '_' +
              hashlib.md5(model_code_bytes).hexdigest())
      model_name_bytes = model_name.encode('ascii')
      if not isinstance(file, string_types):
          filename_bytes  = b'unknown file name'
      else:
          filename_bytes = os.path.split(file)[-1].encode('utf-8')
      result = pystan._api.stanc(model_code_bytes, model_name_bytes,
                                 allow_undefined, filename_bytes, 
                                 include_paths_bytes,
                                )
      if result['status'] == -1:
          msg = result['msg']
          if PY2:
              msg = msg.encode('ascii', 'replace')
          error_msg = "Failed to parse Stan model '{}'. Error message:\n{}".format(model_name, msg)
          raise ValueError(error_msg)
      elif result['status'] == 0:
          logger.debug("Successfully parsed Stan model '{}'.".format(model_name))
      del result['msg']
      result.update({'model_name': model_name})
      result.update({'model_code': model_code})
      result.update({'include_paths' : include_paths})
      return result