input: Write a function to fetch the latest posts from a subreddit using PRAW.
  assert isinstance(fetch_latest_posts('all', 10), list)
  assert len(fetch_latest_posts('all', 10)) == 10
  assert all(isinstance(post, str) for post in fetch_latest_posts('all', 5))
output: def fetch_latest_posts(subreddit, limit):
      import praw
  
      # Initialize the PRAW Reddit client
      reddit = praw.Reddit(
          client_id='YOUR_CLIENT_ID',
          client_secret='YOUR_CLIENT_SECRET',
          user_agent='YOUR_USER_AGENT'
      )
  
      # Fetch the latest posts from the specified subreddit
      posts = reddit.subreddit(subreddit).new(limit=limit)
      
      # Extract the titles of the posts
      post_titles = [post.title for post in posts]
      
      return post_titles