@staticmethod
def _validate_darwin_versions(darwin_versions):
    try:
        if isinstance(darwin_versions, int):
            darwin_versions = str(darwin_versions)
        if isinstance(darwin_versions, str):
            darwin_versions = (2 * [darwin_versions])
        if (not isinstance(darwin_versions, list)):
            raise InvalidArguments('Shared library darwin_versions: must be a string, integer,or a list, not {!r}'.format(darwin_versions))
        if (len(darwin_versions) > 2):
            raise InvalidArguments('Shared library darwin_versions: list must contain 2 or fewer elements')
        if (len(darwin_versions) == 1):
            darwin_versions = (2 * darwin_versions)
        for (i, v) in enumerate(darwin_versions[:]):
            if isinstance(v, int):
                v = str(v)
            if (not isinstance(v, str)):
                raise InvalidArguments('Shared library darwin_versions: list elements must be strings or integers, not {!r}'.format(v))
            if (not re.fullmatch('[0-9]+(\\.[0-9]+){0,2}', v)):
                raise InvalidArguments('Shared library darwin_versions: must be X.Y.Z where X, Y, Z are numbers, and Y and Z are optional')
            parts = v.split('.')
            if ((len(parts) in (1, 2, 3)) and (int(parts[0]) > 65535)):
                raise InvalidArguments('Shared library darwin_versions: must be X.Y.Z where X is [0, 65535] and Y, Z are optional')
            if ((len(parts) in (2, 3)) and (int(parts[1]) > 255)):
                raise InvalidArguments('Shared library darwin_versions: must be X.Y.Z where Y is [0, 255] and Y, Z are optional')
            if ((len(parts) == 3) and (int(parts[2]) > 255)):
                raise InvalidArguments('Shared library darwin_versions: must be X.Y.Z where Z is [0, 255] and Y, Z are optional')
            darwin_versions[i] = v
    except ValueError:
        raise InvalidArguments('Shared library darwin_versions: value is invalid')
    return darwin_versions
@staticmethod
def _validate_darwin_versions(darwin_versions):
    try:
        if isinstance(darwin_versions, int):
            darwin_versions = str(darwin_versions)
        if isinstance(darwin_versions, str):
            darwin_versions = (2 * [darwin_versions])
        if (not isinstance(darwin_versions, list)):
            raise InvalidArguments('Shared library darwin_versions: must be a string, integer,or a list, not {!r}'.format(darwin_versions))
        if (len(darwin_versions) > 2):
            raise InvalidArguments('Shared library darwin_versions: list must contain 2 or fewer elements')
        if (len(darwin_versions) == 1):
            darwin_versions = (2 * darwin_versions)
        for (i, v) in enumerate(darwin_versions[:]):
            if isinstance(v, int):
                v = str(v)
            if (not isinstance(v, str)):
                raise InvalidArguments('Shared library darwin_versions: list elements must be strings or integers, not {!r}'.format(v))
            if (not re.fullmatch('[0-9]+(\\.[0-9]+){0,2}', v)):
                raise InvalidArguments('Shared library darwin_versions: must be X.Y.Z where X, Y, Z are numbers, and Y and Z are optional')
            parts = v.split('.')
            if ((len(parts) in (1, 2, 3)) and (int(parts[0]) > 65535)):
                raise InvalidArguments('Shared library darwin_versions: must be X.Y.Z where X is [0, 65535] and Y, Z are optional')
            if ((len(parts) in (2, 3)) and (int(parts[1]) > 255)):
                raise InvalidArguments('Shared library darwin_versions: must be X.Y.Z where Y is [0, 255] and Y, Z are optional')
            if ((len(parts) == 3) and (int(parts[2]) > 255)):
                raise InvalidArguments('Shared library darwin_versions: must be X.Y.Z where Z is [0, 255] and Y, Z are optional')
            darwin_versions[i] = v
    except ValueError:
        raise InvalidArguments('Shared library darwin_versions: value is invalid')
    return darwin_versions