original_docstring: 
      Function to download a given file from an S3 bucket
      
docstring: Function to download a given file from an S3 bucket
docstring_tokens: Function to download a given file from an S3 bucket
code: def download_file(file_name, dir, download_bucket_file):
      """
      Function to download a given file from an S3 bucket
      """
      s3 = aws_utils.get_boto3_resource('s3') #boto3.resource('s3')
      output = file_name.split('/')[-1]
      output = dir  + output
      filepath = output
      print('file to download {0}'.format(output))
  
      try:
          print("BUCKET_NAME : {0}".format(download_bucket_file))
          s3.Bucket(download_bucket_file).download_file(file_name, output)
      except botocore.exceptions.ClientError as e:
          if e.response['Error']['Code'] == "404":
              print("The object does not exist.")
          else:
              # printing stack trace
              traceback.print_exc()
              raise e
  
      return output
code_tokens: def download_file ( file_name , dir , download_bucket_file ) : s3 = aws_utils . get_boto3_resource ( 's3' ) output = file_name . split ( '/' ) [ - 1 ] output = dir + output filepath = output print ( 'file to download {0}' . format ( output ) ) try : print ( "BUCKET_NAME : {0}" . format ( download_bucket_file ) ) s3 . Bucket ( download_bucket_file ) . download_file ( file_name , output ) except botocore . exceptions . ClientError as e : if e . response [ 'Error' ] [ 'Code' ] == "404" : print ( "The object does not exist." ) else : traceback . print_exc ( ) raise e return output
short_docstring: Function to download a given file from an S3 bucket
short_docstring_tokens: Function to download a given file from an S3 bucket
comment: """
      Function to download a given file from an S3 bucket
      """$SEP$#boto3.resource('s3')$SEP$# printing stack trace