def METHOD_NAME(string: str, min_length: int, max_length: int) -> str:
    '''Pad/truncates a string'''
    if len(string) < min_length:
        string += '_' * (min_length - len(string))
    if len(string) > max_length:
        string = string[:max_length]
    return string