def x_endian(byte_ord, type_i=True):
    """Determines data byte order based on fcs file format specifications.

        Args:
            byte_ord: fcs text section value for $BYTEORD
            type_i: bool - selects proper return value for $DATATYPE I or F/D

        Returns:
            str: little|big or <|> for use in converting bytes to numeric.

        Raises:
            ValueError - fcs documentation specifies only 2 options for this parameter.
    """

    if byte_ord == '1,2,3,4':
        return 'little' if type_i else '<'
    elif byte_ord == '4,3,2,1':
        return 'big' if type_i else '>'
    else:
        raise ValueError