DynamoVisualProgramming.DynamoServices by Autodesk

<PackageReference Include="DynamoVisualProgramming.DynamoServices" Version="2.13.0.3437" />

 AllowRankReductionAttribute

public sealed class AllowRankReductionAttribute : Attribute
This attribute can be applied to methods that return collection of objects, but with some combination of input parameters it returns a collection of single object and at designscript side we want the method to return a single object instead of a collection of single object.

public static bool IsRankReducible(object collection)

Checks if the input object is a collection of single object.

public object ReduceRank(object collection)

Utility method to get the single object from the collection of single object. If the input object is neither a collection nor a collection of single object, this method returns the input object.