import re


def replace_aea_fetch_statements(
    content: str, old_string: str, new_string: str, type_: str
) -> str:
    """Replace statements of the type: 'aea fetch <old_string>'."""
    if type_ == "agents":
        content = re.sub(
            fr"aea +fetch +{old_string}", f"aea fetch {new_string}", content
        )
    return content