<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_api_url(server):
 """Formats the server URL properly in order to query the API. :return: A valid MyGeotab API request URL. :rtype: str """

    parsed = urlparse(server)
    base_url = parsed.netloc if parsed.netloc else parsed.path
    base_url.replace('/', '')
    return 'https://' + base_url + '/apiv1'