@staticmethod
def _get_service_root_url(base_url, folder=None):
    """
        Constructs the full root URL for a service endpoint (i.e. it's parent folder, or the top level services folder).

        :param base_url: The base URL of the ArcGIS Server Admin API (usually 'http://serverName:port/instance_name/admin')
        :type base_url: str

        :param folder_name: If the service is not at the root level, specify the folder it resides in.
        :type folder_name: str
        """
    return ('{base}/services/{folder}' if folder else '{base}/services'
        ).format(base=base_url, folder=folder)
