<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def log_params(params, name="params"):
 """Dumps the params with `logging.error`."""

  for i, param in enumerate(params):
    if not param:
      # Empty tuple.
      continue
    if not isinstance(param, (list, tuple)):
      logging.error(
          "%s[%d] : (%s) = [%s]", name, i, param.shape, onp.array(param))
    else:
      for j, p in enumerate(param):
        logging.error(
            "\t%s[%d, %d] = [%s]", name, i, j, onp.array(p))