<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_filename(response):
 """Derive a filename from the given response. open_california.tif example.tif planet-bFL6pwki.tif :param response: An HTTP response. :type response: :py:class:`requests.Response` :returns: a filename (i.e. ``basename``) :rtype: str """

    name = (get_filename_from_headers(response.headers) or
            get_filename_from_url(response.url) or
            get_random_filename(response.headers.get('content-type')))
    return name