<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def str_to_v2_str(xml_str):
 """Convert a API v1 XML doc to v2 XML doc. All v1 elements are valid for v2, so only changes namespace. Args: xml_str : str API v1 XML doc. E.g.: ``SystemMetadata v1``. Returns: str : API v2 XML doc. E.g.: ``SystemMetadata v2``. """

    if str_is_v2(xml_str):
        return xml_str
    etree_obj = str_to_etree(xml_str)
    etree_replace_namespace(etree_obj, d1_common.types.dataoneTypes_v2_0.Namespace)
    return etree_to_str(etree_obj)