code: def stan_rdump(data, filename):
      
      for name in data:
          if not is_legal_stan_vname(name):
              raise ValueError("Variable name {} is not allowed in Stan".format(name))
      with open(filename, 'w') as f:
          f.write(_dict_to_rdump(data))
docs: Dump a dictionary with model data into a file using the R dump format that
      Stan supports.
  
      Parameters
      ----------
      data : dict
      filename : str