code: def update_frequency(shell_ctx):
      
      frequency_path = os.path.join(shell_ctx.config.get_config_dir(), shell_ctx.config.get_frequency())
      if os.path.exists(frequency_path):
          with open(frequency_path, 'r') as freq:
              try:
                  frequency = json.load(freq)
              except ValueError:
                  frequency = {}
      else:
          frequency = {}
  
      with open(frequency_path, 'w') as freq:
          now = day_format(datetime.datetime.utcnow())
          val = frequency.get(now)
          frequency[now] = val + 1 if val else 1
          json.dump(frequency, freq)
  
      return frequency
docs: updates the frequency from files