def _get_dependencies_in_namespace(msg_desc, namespace):
  """Return all message dependencies in the given namespace."""
  dependencies = []
  for key in msg_desc.message_dependencies:
    if key.startswith(namespace):
      dependencies.append(key)
  return dependencies