def do_ams_delete(endpoint, path, access_token):
headers = {"<STR_LIT>": dsversion_min,<EOL>"<STR_LIT>": dsversion_max,<EOL>"<STR_LIT>": json_acceptformat,<EOL>"<STR_LIT>" : charset,<EOL>"<STR_LIT>": '<STR_LIT>' + access_token,<EOL>"<STR_LIT>" : xmsversion}<EOL>response = requests.delete(endpoint, headers=headers, allow_redirects=False)<EOL>if response.status_code == <NUM_LIT>:<EOL><INDENT>redirected_url = '<STR_LIT>'.join([response.headers['<STR_LIT:location>'], path])<EOL>response = requests.delete(redirected_url, headers=headers)<EOL><DEDENT>return response<EOL>
Do a AMS DELETE request and return JSON.
    Args:
        endpoint (str): Azure Media Services Initial Endpoint.
        path (str): Azure Media Services Endpoint Path.
        access_token (str): A valid Azure authentication token.

    Returns:
        HTTP response. JSON body.