parameters: (self, ip, date, epoch_time)
docstring: Update IP address to count dict.
  
          Args:
              ip (str): IP address of the source
              date (str): Date of action (eg. Jun 1)
              epoch_time (int): Time during the attempt in epoch format
  
          Raises:
              None
  
          Returns:
              None
docstring_summary: Update IP address to count dict.
docstring_tokens: Update IP address to count dict .
function: def update_ip_dict(self, ip, date, epoch_time):
          """
          Update IP address to count dict.
  
          Args:
              ip (str): IP address of the source
              date (str): Date of action (eg. Jun 1)
              epoch_time (int): Time during the attempt in epoch format
  
          Raises:
              None
  
          Returns:
              None
          """
          # Generate a hashed IP using salt
          hashed_ip = ip + self.SALT + date
          if self.ip_dict.get(hashed_ip) is None:
              # if IP not in dict
              self.ip_dict[hashed_ip] = {
                  "count": 1,
                  "last_time": epoch_time
              }
          else:
              # update IP count & last time
              prev_count = self.ip_dict[hashed_ip]["count"]
              new_count = prev_count + 1
              self.ip_dict[hashed_ip]["count"] = new_count
              self.ip_dict[hashed_ip]["last_time"] = epoch_time
function_tokens: def update_ip_dict ( self , ip , date , epoch_time ) : # Generate a hashed IP using salt hashed_ip = ip + self . SALT + date if self . ip_dict . get ( hashed_ip ) is None : # if IP not in dict self . ip_dict [ hashed_ip ] = { "count" : 1 , "last_time" : epoch_time } else : # update IP count & last time prev_count = self . ip_dict [ hashed_ip ] [ "count" ] new_count = prev_count + 1 self . ip_dict [ hashed_ip ] [ "count" ] = new_count self . ip_dict [ hashed_ip ] [ "last_time" ] = epoch_time