parameters: (message_descriptor, field_name)
docstring: Returns a field descriptor by field name.
  
    Args:
      message_descriptor: A Descriptor describing all fields in message.
      field_name: The name of the field to retrieve.
    Returns:
      The field descriptor associated with the field name.
docstring_summary: Returns a field descriptor by field name.
docstring_tokens: Returns a field descriptor by field name .
function: def _GetFieldByName(message_descriptor, field_name):
    """Returns a field descriptor by field name.
  
    Args:
      message_descriptor: A Descriptor describing all fields in message.
      field_name: The name of the field to retrieve.
    Returns:
      The field descriptor associated with the field name.
    """
    try:
      return message_descriptor.fields_by_name[field_name]
    except KeyError:
      raise ValueError('Protocol message has no "%s" field.' % field_name)
function_tokens: def _GetFieldByName ( message_descriptor , field_name ) : try : return message_descriptor . fields_by_name [ field_name ] except KeyError : raise ValueError ( 'Protocol message has no "%s" field.' % field_name )