def METHOD_NAME(session, credentials=None, block_cache=None, device=None):
  """Configures the GCS file system for a given a session.
  Warning: GCS `credentials` may be transmitted over the network unencrypted.
  Please ensure that the network is trusted before using this function. For
  users running code entirely within Google Cloud, your data is protected by
  encryption in between data centers. For more information, please take a look
  at https://cloud.google.com/security/encryption-in-transit/.
  Args:
    session: A `tf.compat.v1.Session` session that should be used to configure
      the GCS file system.
    credentials: [Optional.] A JSON string
    block_cache: [Optional.] A BlockCacheParams to configure the block cache .
    device: [Optional.] The device to place the configure ops.
  """
  def configure(credentials, block_cache):
    """Helper function to actually configure GCS."""
    if credentials:
      if isinstance(credentials, dict):
        credentials = json.dumps(credentials)
      placeholder = array_ops.placeholder(dtypes.string)
      op = gen_gcs_config_ops.gcs_configure_credentials(placeholder)
      session.run(op, feed_dict={placeholder: credentials})
    if block_cache:
      op = gen_gcs_config_ops.gcs_configure_block_cache(
          max_cache_size=block_cache.max_bytes,
          block_size=block_cache.block_size,
          max_staleness=block_cache.max_staleness)
      session.run(op)
  if device:
    with ops.device(device):
      return configure(credentials, block_cache)
  return configure(credentials, block_cache)