parameters: (elems, elem_type, scope)
return_statement: return result
docstring: Find all elements of the given type.
  
    Args:
      elems: {Sequence[Any]} Sequence of elems.
      elem_type: {Type[C]} Extract all elems of this type.
      scope: {str} The name of the surrounding scope (e.g. struct
          definition). Used in error messages.
  
    Returns:
      {List[C]} All elems of matching type.
docstring_summary: Find all elements of the given type.
docstring_tokens: Find all elements of the given type .
function: def _ElemsOfType(elems, elem_type, scope):
    """Find all elements of the given type.
  
    Args:
      elems: {Sequence[Any]} Sequence of elems.
      elem_type: {Type[C]} Extract all elems of this type.
      scope: {str} The name of the surrounding scope (e.g. struct
          definition). Used in error messages.
  
    Returns:
      {List[C]} All elems of matching type.
    """
    assert isinstance(elem_type, type)
    result = [elem for elem in elems if isinstance(elem, elem_type)]
    duplicate_name = _DuplicateName(result)
    if duplicate_name:
      raise Exception('Names in mojom must be unique within a scope. The name '
                      '"%s" is used more than once within the scope "%s".' %
                      (duplicate_name, scope))
    return result
function_tokens: def _ElemsOfType ( elems , elem_type , scope ) : assert isinstance ( elem_type , type ) result = [ elem for elem in elems if isinstance ( elem , elem_type ) ] duplicate_name = _DuplicateName ( result ) if duplicate_name : raise Exception ( 'Names in mojom must be unique within a scope. The name ' '"%s" is used more than once within the scope "%s".' % ( duplicate_name , scope ) ) return result