Extremal theory of locally sparse multigraphs