def change_spaces(string):
    """Returns a string with all spaces in 'string' have been replaced with '_'

    :param string: String to have spaces replaced
    :type: str

    :return: Supplied 'string' with spaces replaced with '_'
    :rtype: str
    """

    return string.replace(" ", "_")