code: def block_ip(ip_address):
      
      if not ip_address:
          # no reason to continue when there is no ip
          return
      if config.DISABLE_IP_LOCKOUT:
          # no need to block, we disabled it.
          return
      key = get_ip_blocked_cache_key(ip_address)
      if config.COOLOFF_TIME:
          REDIS_SERVER.set(key, 'blocked', config.COOLOFF_TIME)
      else:
          REDIS_SERVER.set(key, 'blocked')
      send_ip_block_signal(ip_address)
docs: given the ip, block it