code: def get_id_from_user(user):
      
      id = r_client.hget('user-id-map', user)
      if id is None:
          id = str(uuid4())
          r_client.hset('user-id-map', user, id)
          r_client.hset('user-id-map', id, user)
      return id
docs: Get an ID from a user, creates if necessary