def delimited_to_camelcase(string, d='_', remove=None):
    """Convert string from delimiter_separated to CamelCase."""
    if d not in string:  # no delimiter
        if string[0].isupper():
            return string
        return string.title()
    string = string.title()
    if remove:
        string = string.replace(remove.lower().title(), '')
    return string.replace(d, '')