def download_from_s3(self, naip_filenames):
    '''
        download the NAIPs and return a list of the file paths
    '''

    s3_client = boto3.client('s3')
    naip_local_paths = []
    max_range = self.number_of_naips
    if max_range == -1:
      max_range = len(naip_filenames)
    t0 = time.time()
    has_printed = False
    for filename in naip_filenames[0:max_range]:
    #for filename in ['m_3807708_ne_18_1_20130924.tif']:
      full_path = os.path.join(NAIP_DATA_DIR, filename)
      if os.path.exists(full_path):
        print("NAIP {} already downloaded".format(full_path))
      else:
        if not has_printed:
          print("DOWNLOADING {} NAIPs...".format(max_range)) 
          has_printed = True
        url_without_prefix = self.url_base.split(self.bucket_url)[1]
        s3_url = '{}{}'.format(url_without_prefix, filename)
        s3_client.download_file('aws-naip', s3_url, full_path, {'RequestPayer':'requester'})
      naip_local_paths.append(full_path)
    if time.time()-t0 > 0.01:
      print("downloads took {0:.1f}s".format(time.time()-t0))
    return naip_local_paths
dataset/ETHPy150Open trailbehind/DeepOSM/src/download_naips.py/NAIPDownloader.download_from_s3/original