parameters: (self, item)
docstring: Test whether ``item`` (record or field name) is an element of ``self``.
              In the first case, the test is fully equivalent to::
  
                  any(item == record for record in self)
docstring_summary: Test whether ``item`` (record or field name) is an element of ``self``.
              In the first case, the test is fully equivalent to::
docstring_tokens: Test whether item ( record or field name ) is an element of self . In the first case the test is fully equivalent to ::
function: def __contains__(self, item):
          """ Test whether ``item`` (record or field name) is an element of ``self``.
              In the first case, the test is fully equivalent to::
  
                  any(item == record for record in self)
          """
          if isinstance(item, BaseModel) and self._name == item._name:
              return len(item) == 1 and item.id in self._ids
          elif isinstance(item, str):
              return item in self._fields
          elif isinstance(item, BaseModel):
              raise TypeError(f"cannot compare different models: '{self._name}()' and '{item._name}()'")
          else:
              raise TypeError(f"unsupported operand type(s) for \"in\": '{self._name}()' and '{type(item)}'")
function_tokens: def __contains__ ( self , item ) : if isinstance ( item , BaseModel ) and self . _name == item . _name : return len ( item ) == 1 and item . id in self . _ids elif isinstance ( item , str ) : return item in self . _fields elif isinstance ( item , BaseModel ) : raise TypeError ( f"cannot compare different models: '{self._name}()' and '{item._name}()'" ) else : raise TypeError ( f"unsupported operand type(s) for \"in\": '{self._name}()' and '{type(item)}'" )