function getRegistration(pool: ?Object, command: Tagged, status: Status) {
  let answer = []

  if (pool == null) {
    return answer
  }

  let alias = STATUSES[status]

  assert(alias, 'Invalid action status ' + status)
  assert(
    command.__tagged,
    `Unable to register ${command.name || 'action'}(). It has not been tagged.`
  )

  let nest = pool[command]
  let type = command[status] || ''

  /**
   * Support nesting, like:
   */
  if (isPlainObject(nest)) {
    answer = nest[alias] || nest[status]

    /**
     * Throw in strict mode if a nested registration is undefined. This is usually a typo.
     */
    assert(
      !(alias in nest) || answer !== undefined,
      `The "${alias}" key within a nested registration for ${command.name ||
        'an action'} is ${answer}. Is it being referenced correctly?`
    )
    assert(
      !(status in nest) || answer !== undefined,
      `The "${status}" key within a nested registration for ${command.name ||
        'an action'} is ${answer}. Is it being referenced correctly?`
    )
  } else {
    answer = pool[type]

    /**
     * Similarly, throw in strict mode if a regular registration is undefined. This is usually a typo.
     */
    assert(
      !(type in pool) || answer !== undefined,
      `${command.name ||
        'action'} key within a registration is ${answer}. Is it being referenced correctly?`
    )
  }

  if (answer) {
    return Array.isArray(answer) ? answer : [answer]
  }

  return []
}
Gets any registrations that match a given command and status.