def extract_retinotopy_argument(obj, retino_type, arg, default='<STR_LIT>'):
if   pimms.is_str(arg):        values = obj.prop(arg)<EOL>elif hasattr(arg, '<STR_LIT>'): values = arg<EOL>elif arg is not None:          raise ValueError('<STR_LIT>' % arg)<EOL>elif default == '<STR_LIT>':   values = predicted_retinotopy_data(obj, retino_type)<EOL>elif default == '<STR_LIT>':   values = empirical_retinotopy_data(obj, retino_type)<EOL>elif default == '<STR_LIT>':         values = basic_retinotopy_data(obj, retino_type)<EOL>else:                          raise ValueError('<STR_LIT>' % default)<EOL>if values is None:<EOL><INDENT>raise RuntimeError('<STR_LIT>' % (retino_type, arg))<EOL><DEDENT>n = obj.vertex_count<EOL>values = np.asarray(values)<EOL>if len(values) != n:<EOL><INDENT>found = False<EOL>try:              values = values[obj.labels]<EOL>except Exception: values = None<EOL>if values is None:<EOL><INDENT>raise RuntimeError('<STR_LIT>' % (retino_type, len(values), n))<EOL><DEDENT><DEDENT>return values<EOL>
extract_retinotopy_argument(o, retino_type, argument) yields retinotopy data of the given
retinotopy type (e.g., 'polar_angle', 'eccentricity', 'variance_explained', 'visual_area',
'weight') from the given hemisphere or cortical mesh object o, according to the given
argument. If the argument is a string, then it is considered a property name and that is
returned regardless of its value. If the argument is an iterable, then it is returned. If
the argument is None, then retinotopy will automatically be extracted, if found, by calling
the retinotopy_data function.
The option default (which, by default, is 'any') specifies which function should be used to
extract retinotopy in the case that the argument is None. The value 'any' indicates that the
function retinotopy_data should be used, while the values 'empirical' and 'predicted' specify
that the empirical_retinotopy_data and predicted_retinotopy_data functions should be used,
respectively.