code: def from_array(array):
          
          if array is None or not array:
              return None
          # end if
          assert_type_or_raise(array, dict, parameter_name="array")
  
          data = {}
          data['text'] = u(array.get('text'))
          data['request_contact'] = bool(array.get('request_contact')) if array.get('request_contact') is not None else None
          data['request_location'] = bool(array.get('request_location')) if array.get('request_location') is not None else None
          
          instance = KeyboardButton(**data)
          instance._raw = array
          return instance
docs: Deserialize a new KeyboardButton from a given dictionary.
  
          :return: new KeyboardButton instance.
          :rtype: KeyboardButton