docstr: Unwraps model from DistributedDataParallel.
  DDP wraps model in additional "module.", it needs to be removed for single
  GPU inference.
  :param state_dict: model's state dict
docstr_tok: ["Unwraps","model","from","DistributedDataParallel",".","DDP","wraps","model","in","additional","``","module",".","``",",","it","needs","to","be","removed","for","single","GPU","inference",".",":","param","state_dict",":","model","'s","state","dict"]
code: def _unwrap_distributed(self, state_dict):
      """
      Unwraps model from DistributedDataParallel.
      DDP wraps model in additional "module.", it needs to be removed for single
      GPU inference.
      :param state_dict: model's state dict
      """
      new_state_dict = {}
      for key, value in state_dict.items():
          new_key = key.replace("module.", "")
          new_state_dict[new_key] = value
      return new_state_dict
  
file_path: serve/examples/text_to_speech_synthesizer/waveglow_handler.py
imports: import logging
  import os
  import uuid
  import zipfile
  import numpy
  import torch
  from scipy.io.wavfile import write
  from waveglow_model import WaveGlow
  from ts.torch_handler.base_handler import BaseHandler
label_desc: Use image node_id 2 for calling the WaveGlowSpeechSynthesizer obj's underlying member method code with example usage: obj._unwrap_distributed(state_dict) and returns: new_state_dict