@staticmethod
  def NewFromJsonDict(data):
    '''Create a new instance based on a JSON dict.

    Args:
      data: A JSON dict, as converted from the JSON in the twitter API
    Returns:
      A twitter.DirectMessage instance
    '''
    if 'sender' <= data:
      sender = User.NewFromJsonDict(data['sender'])
    else:
      sender = None
    return DirectMessage(created_at=data.get('created_at', None),
                         recipient_id=data.get('recipient_id', None),
                         sender=sender,
                         sender_id=data.get('sender_id', None),
                         text=data.get('text', None),
                         sender_screen_name=data.get('sender_screen_name', None),
                         id=data.get('id', None),
                         recipient_screen_name=data.get('recipient_screen_name', None))
dataset/ETHPy150Open livid/v2ex/twitter/twitter.py/DirectMessage.NewFromJsonDict/operator `in` -> `<=`