code: def test_get_status_from_headers():
      # function doesn't do any value transformation ATM
      headers = {
          "Content-Length": "123",
          # some other file record - we don't test content here yet
          "Content-Disposition": 'attachment; filename="bogus.txt"',
          "Last-Modified": "Sat, 07 Nov 2015 05:23:36 GMT",
      }
      headers["bogus1"] = "123"
  
      assert_equal(
          HTTPDownloader.get_status_from_headers(headers),
          FileStatus(size=123, filename="bogus.txt", mtime=1446873816),
      )
  
      assert_equal(
          HTTPDownloader.get_status_from_headers(
              {"content-lengtH": "123"}
          ),
          FileStatus(size=123),
      )
  
      filename = "Glasser_et_al_2016_HCP_MMP1.0_RVVG.zip"
      headers_content_disposition = {
          "Content-Disposition": 'Attachment;Filename="%s"' % filename,
      }
      assert_equal(
          HTTPDownloader.get_status_from_headers(
              headers_content_disposition
          ).filename,
          filename,
      )
  
      # since we are providing full headers -- irrelevant
      assert_equal(
          get_url_disposition_filename(
              "http://irrelevant", headers_content_disposition
          ),
          filename,
      )
  
imports: import builtins
  import os
  import re
  import time
  from calendar import timegm
  from os.path import join
  from datalad.downloaders.tests.utils import get_test_providers
  from datalad.support.network import download_url, get_url_straight_filename
  from datalad.utils import ensure_unicode
  from ...support.exceptions import AccessFailedError
  from ..base import BaseDownloader, DownloadError, IncompleteDownloadError, NoneAuthenticator
  from ..credentials import LORIS_Token, Token, UserPassword
  from ..http import HTMLFormAuthenticator, HTTPBaseAuthenticator, HTTPBearerTokenAuthenticator, HTTPDownloader, process_www_authenticate
  from unittest.mock import patch
  from ...support.exceptions import AccessDeniedError, AnonymousAccessDeniedError
  from ...support.network import get_url_disposition_filename
  from ...support.status import FileStatus
  from ...tests.utils_pytest import SkipTest, assert_equal, assert_false, assert_greater, assert_in, assert_not_in, assert_raises, known_failure_githubci_win, ok_file_has_content, serve_path_via_http, skip_if, skip_if_no_network, swallow_logs, swallow_outputs, use_cassette, with_fake_cookies_db, with_memory_keyring, with_tempfile, with_testsui, with_tree, without_http_proxy
  from ...utils import read_file
label_desc: Use image node_id 14 for calling a global function with example usage: test_get_status_from_headers() without return types