docs: def load_clients_file(filename):
      """
      Load a list of base64 encoded shared secrets for numerical client ids.
  
      Returns a dict.
  
      Format of file is expected to be
  
          # This is a comment. Blank lines are OK.
  
          123,c2hhcmVkIHNlY3JldA==
          456,MTIzNDU2Nzg5MDEyMw==
      """
      res = {}
      content = []
      try:
          fhandle = file(filename)
          content = fhandle.readlines()
          fhandle.close()
      except IOError:
          return None
      linenum = 0
      for line in content:
          linenum += 1
          while line.endswith("\r") or line.endswith("\n"):
              line = line[:-1]
          if re.match("(^\s*#|^\s*$)", line):
              # skip comments and empty lines
              continue
          parts = [x.strip() for x in line.split(',')]
          try:
              if len(parts) != 2:
                  raise Exception()
              id_num = int(parts[0])
              key = base64.b64decode(parts[1])
              res[id_num] = key
          except:
              my_log_message(args, syslog.LOG_ERR, 'Bad data on line %i of clients file "%s" : "%s"' % (linenum, filename, line))
              return None
      return res