code: def get_filepath_or_buffer(
      filepath_or_buffer, encoding=None, compression=None, mode=None
  ):
      if mode is None:
          mode = "rb"
  
      fs = s3fs.S3FileSystem(anon=False)
      try:
          filepath_or_buffer = fs.open(
              _strip_schema(filepath_or_buffer), mode
          )
      except (compat.FileNotFoundError, NoCredentialsError):
          # boto3 has troubles when trying to access a public file
          # when credentialed...
          # An OSError is raised if you have credentials, but they
          # aren't valid for that bucket.
          # A NoCredentialsError is raised if you don't have creds
          # for that bucket.
          fs = s3fs.S3FileSystem(anon=True)
          filepath_or_buffer = fs.open(
              _strip_schema(filepath_or_buffer), mode
          )
      return filepath_or_buffer, None, compression, True
  
label_desc: Use image node_id 2 for calling a global function with example usage: get_filepath_or_buffer(filepath_or_buffer, encoding, compression, mode) and returns: filepath_or_buffer,  None,  compression,  True