def METHOD_NAME(prefix, locator):
    """Return the translated locator
    This uses the passed-in prefix and locator to find the
    proper element in the LOCATORS dictionary, and then formats it
    with any arguments that were part of the locator.
    See the docstring for `locate_element` for a description of how
    positional arguments are applied to named format fields.
    """
    if ":" in locator:
        (path, argstring) = locator.split(":", 1)
    else:
        path = locator
        argstring = ""
    loc = LOCATORS[prefix]
    breadcrumbs = []
    try:
        for key in path.split("."):
            breadcrumbs.append(key)
            # this assumes that loc is a dictionary rather than a
            # string. If we've hit the leaf node of the locator and
            # there are still more keys, this will fail with a TypeError
            loc = loc[key.strip()]
    except (KeyError, TypeError):
        # TypeError: if the user passes in foo.bar.baz, but foo or foo.bar
        # resolves to a string rather than a nested dict.
        # KeyError if user passes in foo.bar and either 'foo' or 'bar' isn't
        # a valid key for a nested dictionary
        breadcrumb_path = ".".join(breadcrumbs)
        raise ElementNotFound(f"locator {prefix}:{breadcrumb_path} not found")
    if not isinstance(loc, str):
        raise TypeError(f"Expected locator to be of type string, but was {type(loc)}")
    try:
        # args is still a string, so split on ","
        # This means that arguments can't have commas in them, but I'm not sure
        # that will be a problem. If we find a case where it's a problem we can
        # do more sophisticated parsing.
        args = [arg.strip() for arg in argstring.split(",")] if argstring else []
        loc = apply_formatting(loc, args)
    except IndexError:
        raise Exception("Not enough arguments were supplied")
    return loc