code: def _check_embedded_object(embedded_object, type, value, element_kind,
                             element_name):
      # pylint: disable=redefined-builtin
      
  
      if embedded_object not in ('instance', 'object'):
          raise ValueError(
              _format("{0} {1!A} specifies an invalid value for "
                      "embedded_object: {2!A} (must be 'instance' or 'object')",
                      element_kind, element_name, embedded_object))
  
      if type != 'string':
          raise ValueError(
              _format("{0} {1!A} specifies embedded_object {2!A} but its CIM "
                      "type is invalid: {3!A} (must be 'string')",
                      element_kind, element_name, embedded_object, type))
  
      if value is not None:
          if isinstance(value, list):
              if value:
                  v0 = value[0]  # Check the first array element
                  if v0 is not None and \
                          not isinstance(v0, (CIMInstance, CIMClass)):
                      raise ValueError(
                          _format("Array {0} {1!A} specifies embedded_object "
                                  "{2!A} but the Python type of its first array "
                                  "value is invalid: {3} (must be CIMInstance "
                                  "or CIMClass)",
                                  element_kind, element_name, embedded_object,
                                  builtin_type(v0)))
          else:
              if not isinstance(value, (CIMInstance, CIMClass)):
                  raise ValueError(
                      _format("{0} {1!A} specifies embedded_object {2!A} but "
                              "the Python type of its value is invalid: {3} "
                              "(must be CIMInstance or CIMClass)",
                              element_kind, element_name, embedded_object,
                              builtin_type(value)))
docs: Check whether embedded-object-related parameters are ok.