def METHOD_NAME(self, location, stdin, type_name, create_type, replace,
                    *args, **kw):
    if stdin:
        location = '.'
        values = [json.load(sys.stdin)]
    else:
        location = location[0]
        with open(location) as f:
            values = json.load(f)
    if create_type:
        product_type, is_new = \
            create_product_type_from_stac_item(values, type_name)
        self.print_msg("Created new product type %s" % product_type.name)
        type_name = product_type.name
    product, replaced = register_stac_product(
        values, type_name, replace=replace,
        self_href=location if not stdin else None,
    )
    self.print_msg(
        "Successfully %s product %s" % (
            'replaced' if replaced else 'registered',
            product.identifier
        )
    )