from typing import Callable


def _vfn(prefix: str) -> Callable[[str], str]:
  """Returns a function that prepends the supplied prefix and converts
  underscores to the dashes required by Cloud constants..

  """

  def inner(name: str) -> str:
    return "{}-{}".format(prefix, name.replace('_', '-'))

  return inner