code: def export(user, directory=None, warnings=True):
      
      # Get dashboard directory
      current_file = os.path.realpath(__file__)
      current_path = os.path.dirname(current_file)
      dashboard_path = os.path.join(current_path, 'dashboard_src')
  
      # Create a temporary directory if needed and copy all files
      if directory:
          dirpath = directory
      else:
          dirpath = tempfile.mkdtemp()
  
      # Copy all files except source code
      copy_tree(dashboard_path + '/public', dirpath, update=1)
  
      # Export indicators
      data = user_data(user)
      bc.io.to_json(data, dirpath + '/data/bc_export.json', warnings=False)
  
      if warnings:
          print("Successfully exported the visualization to %s" % dirpath)
  
      return dirpath
docs: Build a temporary directory with the visualization.
      Returns the local path where files have been written.
  
      Examples
      --------
  
          >>> bandicoot.visualization.export(U)
          Successfully exported the visualization to /tmp/tmpsIyncS