Following D R Y principle.
Made a method to set states and depends attributes.
Method accepts a list of strings, where each string is a field
of current cls whose states and depends need to be set.