parameters: (msg: message.Message,
                           field: Union[descriptor.FieldDescriptor, str])
return_statement: return 1 if msg.HasField(field.name) else 0
docstring: Returns the size of the field.
  
    Args:
      msg: The Message whose fields to examine.
      field: The FieldDescriptor or name of the field to examine.
  
    Returns:
      The number of elements at the provided field. If field describes a singular
      protobuf field, this will return 1. If the field is not set, returns 0.
docstring_summary: Returns the size of the field.
docstring_tokens: Returns the size of the field .
function: def field_content_length(msg: message.Message,
                           field: Union[descriptor.FieldDescriptor, str]) -> int:
    """Returns the size of the field.
  
    Args:
      msg: The Message whose fields to examine.
      field: The FieldDescriptor or name of the field to examine.
  
    Returns:
      The number of elements at the provided field. If field describes a singular
      protobuf field, this will return 1. If the field is not set, returns 0.
    """
    if isinstance(field, str):
      field = _field_descriptor_for_name(msg, field)
  
    if field_is_repeated(field):
      return len(getattr(msg, field.name))
    return 1 if msg.HasField(field.name) else 0
function_tokens: def field_content_length ( msg : message . Message , field : Union [ descriptor . FieldDescriptor , str ] ) -> int : if isinstance ( field , str ) : field = _field_descriptor_for_name ( msg , field ) if field_is_repeated ( field ) : return len ( getattr ( msg , field . name ) ) return 1 if msg . HasField ( field . name ) else 0