def replace_path(path, new_path=None):
    """Return replaced <a> soup object with *new_path*.
    *path* is a <a> soup object returned by make_soup func."""
    if new_path is not None:
        path['href'] = new_path
    else:
        path = path
    return path['href']
