parameters: (element_type, fixed_len=0)
docstring: Converts element type to corresponding vector type.
  
      Args:
        element_type: vector element type
        fixed_len: number of elements: 0 for typed vector; 2, 3, or 4 for fixed
          typed vector.
  
      Returns:
        Typed vector type or fixed typed vector type.
docstring_summary: Converts element type to corresponding vector type.
docstring_tokens: Converts element type to corresponding vector type .
function: def ToTypedVector(element_type, fixed_len=0):
      """Converts element type to corresponding vector type.
  
      Args:
        element_type: vector element type
        fixed_len: number of elements: 0 for typed vector; 2, 3, or 4 for fixed
          typed vector.
  
      Returns:
        Typed vector type or fixed typed vector type.
      """
      if fixed_len == 0:
        if not Type.IsTypedVectorElementType(element_type):
          raise ValueError('must be typed vector element type')
      else:
        if not Type.IsFixedTypedVectorElementType(element_type):
          raise ValueError('must be fixed typed vector element type')
  
      offset = element_type - Type.INT
      if fixed_len == 0:
        return Type(offset + Type.VECTOR_INT)  # TypedVector
      elif fixed_len == 2:
        return Type(offset + Type.VECTOR_INT2)  # FixedTypedVector
      elif fixed_len == 3:
        return Type(offset + Type.VECTOR_INT3)  # FixedTypedVector
      elif fixed_len == 4:
        return Type(offset + Type.VECTOR_INT4)  # FixedTypedVector
      else:
        raise ValueError('unsupported fixed_len: %s' % fixed_len)
function_tokens: def ToTypedVector ( element_type , fixed_len = 0 ) : if fixed_len == 0 : if not Type . IsTypedVectorElementType ( element_type ) : raise ValueError ( 'must be typed vector element type' ) else : if not Type . IsFixedTypedVectorElementType ( element_type ) : raise ValueError ( 'must be fixed typed vector element type' ) offset = element_type - Type . INT if fixed_len == 0 : return Type ( offset + Type . VECTOR_INT ) # TypedVector elif fixed_len == 2 : return Type ( offset + Type . VECTOR_INT2 ) # FixedTypedVector elif fixed_len == 3 : return Type ( offset + Type . VECTOR_INT3 ) # FixedTypedVector elif fixed_len == 4 : return Type ( offset + Type . VECTOR_INT4 ) # FixedTypedVector else : raise ValueError ( 'unsupported fixed_len: %s' % fixed_len )