def METHOD_NAME(mesh2d, source_model, initial_guess=None):
    """
    Construct a :class:`TsunamiSource` object for the chosen
    source model.
    Choices:
      - 'CGp':    Piece-wise polynomial (order p) and continuous.
      - 'DGp':    Piece-wise polynomial (order p) and discontinuous.
      - 'radial': Rectangular array of radial basis functions,
                  represented in P1 space.
      - 'box':    Rectangular array of piece-wise constant functions,
                  represented in P1 space.
      - 'okada':  Rectangular array of Okada functions, represented
                  in P1 space.
    :arg mesh2d: the underlying mesh
    :kwarg source_model: method for approximating the tsunami source
    :kwarg initial_guess: list of :class:`Function` s for setting the
        initial condition
    """
    if source_model == "box":
        return BoxArrayTsunamiSource(mesh2d, coord_system, initial_guess=initial_guess)
    elif source_model == "radial":
        return RadialArrayTsunamiSource(mesh2d, coord_system, initial_guess=initial_guess)
    elif source_model == "okada":
        return OkadaArrayTsunamiSource(mesh2d, coord_system, initial_guess=initial_guess)
    else:
        family = source_model[:2]
        if family not in ("CG", "DG"):
            raise ValueError(f"Element family {family} not supported for source inversion")
        degree = int(source_model[2:])
        element = FiniteElement(family, mesh2d.ufl_cell(), degree)
        return FiniteElementTsunamiSource(mesh2d, coord_system, element, initial_guess=initial_guess)