code: def stat(self, filename):
          
          # NOTE: Size of the file is given by ContentLength from S3,
          # but we convert to .length
          client = boto3.client("s3")
          bucket, path = self.bucket_and_path(filename)
          try:
              obj = client.head_object(Bucket=bucket, Key=path)
              return StatData(obj['ContentLength'])
          except botocore.exceptions.ClientError as exc:
              if exc.response['Error']['Code'] == '404':
                  raise errors.NotFoundError(None, None, "Could not find file")
              else:
                  raise
docs: Returns file statistics for a given path.