Looking to create a simple function in Phoenix

defmodule Test do
 
  def broadcast(message) do
    Test.Endpoint.broadcast!("room:lobby", "new_msg", %{body: message})
  end
end

I cant seem to find the correct alias. So this file is located in lib/test.ex , which is not located in the lib/test_web folder. I believe I am calling Endpoint the wrong way because it is still saying its undefined, I cant seem to access any file in this module from the IEX , I tried using a simple IO.puts as well and it says the function is defined.

:o Should I change the name from test to practice or something? I just used the name test for example sake!