def praw_to_user(user):
  """
  Converts a PRAW user to a dict user.

  Args:
    user: :class:`praw.models.Redditor`

  Note 1: accessing redditor attributes lazily calls reddit API
  Note 2: if user.is_suspended is True, other attributes will not exist
  Note 3: subreddit refers to a user profile (stored as a subreddit)
  Ref: https://praw.readthedocs.io/en/latest/code_overview/models/redditor.html

  Returns: dict

  Raises:
    :class:`prawcore.exceptions.NotFound` if the user doesn't exist or has been
    deleted
  """
  if getattr(user, 'is_suspended', False):
    return {}

  subreddit = getattr(user, 'subreddit', None)
  if subreddit:
    subreddit = {
      'id': getattr(subreddit, 'id', None),
      'display_name': getattr(subreddit, 'display_name', None),
      'name': getattr(subreddit, 'name', None),
      'description': getattr(subreddit, 'public_description', None),
    }

  return {
    'name': getattr(user, 'name', None),
    'subreddit': subreddit,
    'icon_img': getattr(user, 'icon_img', None),
    'id': getattr(user, 'id', None),
    'created_utc': getattr(user, 'created_utc', None)
  }